import java.util.*;

public class Solution 
{
    public static void main (String[] args)
    {
        //************ALL DOCUMENTED TEST CASES**********
        //Ascending
        //float[] nums = new float[]{0f,2f,3f,4f,6f,8f,9f};   //Test case 1    PASS             
        //float[] nums = new float[]{-1f};   //Test case 2             PASS             
        //float[] nums = new float[]{0f};   //Test case 3       PASS                    
        //float[] nums = new float[]{0,1f,2,4f,5,7f};   //Test case 4    PASS            
        
        //Descending
        //float[] nums = float int[]{9f,8f,6f,4f,3f,2f,0f};    PASS            
        //float[] nums = new float[]{-1f};                PASS             
        //float[] nums = new float[]{0f};          PASS                    
        //float[] nums = new float[]{7f,5f,4f,2f,1f,0f};      PASS 
        
        //For some reason, no test cases above went through junction 8. All others are valid.
        //So these were new devised cases.....
        //float[] nums = new float[]{0f,1f,2f,4f,5f,7f,8f,10f,14f};   //Test case 4    PASS            
        //float[] nums = new float[]{0f,2f,4f,5f,7f,8f,10f,14f,17f,19f,23f,24f,25f,26f,35f,42f,43f,44f};  PASS     
        //float[] nums = new float[]{5f,4f,3f,4f,5f,7f,6f,10f,14f,17f,19f,23f,24f,25f,26f,35f,42f,47f,60f,61f};  PASS
        //float[] nums = new float[]{7f,6f,9f,3f,5f,8f};
        
        //Merging both ascending and descending code
        //float[] nums = new float[]{5f,4f,3f,4f,5f,6f,8f,8f};   PASS
        //float[] nums = new float[]{5f,4f,3f,4f,5f,7f,6f,5f,10f,14f,17f,19f,23f,24f,25f,26f,35f,34f,33f,47f};  PASS
        
        //float[] nums = new float[]{5f,6f,7f,6f,5f,9f,10f,11f,44f,45f,46f,47f,46f,45f,44f,43f,25f,24f,24f,23f,23f,22f};  //using ascending, descending and non-changing....PASS
        
        //float[] nums = new float[]{5f,9f,13f,2f,3f,4f,3f,1f,2f,3f,4f,5f,6f,22f,66f,65f,65f,64f,63f,90f,89f,60f}; //using standalone numbers in between and also ascending/descending...PASS
        //float[] nums = new float[]{1.5f,1.9f,  1.13f,  1.2f, 1.3f, 1.4f, 1.5f, 1.3f,  1.1f,  1.2f};
        
        //float[] nums = new float[]{1.5f,1.9f,  1.13f,  1.2f, 1.1f, 1.4f, 1.5f, 1.3f,  1.1f,  1.2f};
        
        //float[] nums = new float[]{2.0f,4.0f,2.0f,1.2f,1.3f,1.4f,1.3f,1.1f,1.2f,1.3f,1.4f,1.5f,1.6f,1.22f,1.66f,1.65f,1.65f,1.64f,1.63f,1.90f,1.89f,1.60f}; 
        
        //repeat numbers
        //float[] nums = new float[]{2,2,2,4,4,1,1,9,9};  PASS
        
        
        float[] nums = {
        //4.9f, 4.8f, 4.7f, 4.6f, 4.7f, 4.8f, 4.9f, 5.0f, 48.5f, 91.7f  //in test documentation,  used to test the transition 4.6
        //4.9f, 4.8f, 4.7f, 4.5f, 4.6f, 4.7f, 4.9f, 5.0f, 48.5f, 91.7f  //in test documentation , used to test 4.5f standalone merging upwards into ascending
        //0.9f, 0.8f, 0.7f, 0.6f, 0.7f, 0.8f, 0.9f, 5.0f   //test case in documentation where I resolved end of range with standalone....
        //86.0f,77.7f, 77.8f, 77.9f, 78.0f, 78.1f,78.0f, 77.9f, 77.8f, 77.7f, 25.3f, 72.8f, 42.5f   //this will be section of the ChatGPT data in order to ensure I can resolve issues quicker
        //25.3f, 72.8f,42.5f, 74.5f, 74.4f, 74.3f, 74.2f, 74.1f, 74.2f, 74.3f, 74.4f,74.5f   //this will be section of the ChatGPT data in order to ensure I can resolve issues quicker
        //47.3f, 47.2f, 47.3f, 47.4f,47.5f  //issues encountered at end of the chatGPT array. it did not merge last two items.
        
        //47.4f, 47.3f,47.4f   //realised at end of the documentation, that this is failing...
        //47.3f, 47.4f,47.3f   // NEED TO FIX THIS ALSO, resolved as part of the above one...
        47.4f, 47.3f,47.5f  //NEED TO FIX THIS ALSO
        
        
        //this is chatGPT extract
        //4.9f,4.9f,4.8f, 4.8f, 4.7f, 4.6f, 4.7f, 4.8f, 4.9f, 5.0f, 48.5f, 91.7f, 47.4f, 47.3f,47.4f, 82.9f, 57.6f, 57.5f, 57.4f, 57.3f, 57.2f, 57.3f, 57.4f, 57.5f, 57.6f, 26.1f, 25.4f, 21.2f, 83.5f, 56.3f, 56.2f, 56.1f, 56.0f, 55.9f, 55.8f, 55.7f, 55.6f, 13.9f, 35.7f, 54.8f, 54.7f, 54.6f, 54.5f, 54.6f, 54.7f, 54.8f, 54.9f, 49.9f,  9.6f, 86.0f, 77.7f, 77.8f, 77.9f, 78.0f, 78.1f, 78.0f, 77.9f, 77.8f, 77.7f, 25.3f, 72.8f, 42.5f, 74.5f, 74.4f, 74.3f, 74.2f, 74.1f, 74.2f, 74.3f, 74.4f, 74.5f, 90.6f, 30.0f, 66.5f, 11.2f, 64.2f, 64.3f, 64.4f, 64.5f, 64.6f, 64.5f, 64.4f, 64.3f, 64.2f, 18.8f, 49.3f, 60.3f, 51.1f, 52.5f, 52.4f, 52.3f, 52.2f, 52.1f, 52.0f, 51.9f, 51.8f,  1.8f, 70.5f, 69.2f, 79.8f, 86.7f, 86.6f, 86.5f, 86.4f, 86.3f, 86.4f, 86.5f, 86.6f, 86.7f, 17.9f, 80.8f, 23.9f, 89.6f, 36.0f, 35.9f, 35.8f, 35.7f, 35.6f, 35.7f, 35.8f, 35.9f, 36.0f, 95.8f, 28.9f, 71.6f,  5.3f, 60.0f, 60.1f, 60.2f, 60.3f, 60.4f, 60.3f, 60.2f, 60.1f, 60.0f, 45.2f, 16.2f, 50.6f, 34.1f, 68.4f, 68.3f, 68.2f, 68.1f, 68.0f, 67.9f, 67.8f, 67.7f, 67.6f, 89.9f, 27.1f, 14.4f, 98.9f, 63.8f, 63.9f, 64.0f, 64.1f, 64.2f, 64.1f, 64.0f, 63.9f, 63.8f, 54.8f, 22.6f, 41.1f, 91.4f, 47.9f, 47.8f, 47.7f, 47.6f, 47.5f, 47.6f, 47.7f, 47.8f, 47.9f, 58.5f, 70.8f, 11.3f, 58.6f, 58.7f, 58.8f, 58.9f, 59.0f, 58.9f, 58.8f, 58.7f, 58.6f, 35.3f, 76.8f, 44.2f, 96.7f, 52.0f, 51.9f, 51.8f, 51.7f, 51.6f, 51.5f, 51.4f, 51.3f, 51.2f, 20.3f, 93.8f, 37.8f, 61.8f, 30.6f, 30.7f, 30.8f, 30.9f, 31.0f, 30.9f, 30.8f, 30.7f, 30.6f, 12.1f, 84.4f,  2.9f, 63.2f, 69.7f, 69.6f, 69.5f, 69.4f, 69.3f, 69.4f, 69.5f, 69.6f, 69.7f, 55.4f, 81.6f, 32.4f,  6.0f, 79.8f, 79.9f, 80.0f, 80.1f, 80.2f, 80.1f, 80.0f, 79.9f, 79.8f, 88.2f, 21.3f, 45.1f, 90.3f, 42.3f, 42.2f, 42.1f, 42.0f, 41.9f, 41.8f, 41.7f, 41.6f, 41.5f, 62.9f, 97.6f, 53.1f, 24.7f, 66.0f, 65.9f, 65.8f, 65.7f, 65.6f, 65.7f, 65.8f, 65.9f, 66.0f, 49.6f, 83.5f, 38.6f, 10.4f, 77.6f, 77.5f, 77.4f, 77.3f, 77.2f, 77.3f, 77.4f, 77.5f, 77.6f,  3.1f, 60.6f, 88.0f, 92.6f, 74.6f, 74.7f, 74.8f, 74.9f, 75.0f, 74.9f, 74.8f, 74.7f, 74.6f, 31.4f, 13.4f, 55.7f, 64.5f, 50.2f, 50.1f, 50.0f, 49.9f, 49.8f, 49.9f, 50.0f, 50.1f, 50.2f, 58.0f, 67.8f, 41.3f, 96.8f, 72.3f, 72.2f, 72.1f, 72.0f, 71.9f, 71.8f, 71.7f, 71.6f, 71.5f, 29.7f, 81.9f, 18.0f, 46.4f, 34.3f, 34.4f, 34.5f, 34.6f, 34.7f, 34.6f, 34.5f, 34.4f, 34.3f, 85.7f, 14.3f, 26.5f, 56.9f, 61.6f, 61.5f, 61.4f, 61.3f, 61.2f, 61.1f, 61.0f, 60.9f, 60.8f, 43.6f, 89.0f,  7.1f, 75.2f, 39.2f, 39.1f, 39.0f, 38.9f, 38.8f, 38.9f, 39.0f, 39.1f, 39.2f, 94.9f, 23.7f, 48.2f, 87.2f, 52.8f, 52.9f, 53.0f, 53.1f, 53.2f, 53.1f, 53.0f, 52.9f, 52.8f, 12.8f, 97.0f, 20.7f, 68.9f, 73.1f, 73.0f, 72.9f, 72.8f, 72.7f, 72.6f, 72.5f, 72.4f, 72.3f, 54.6f, 15.5f, 40.1f, 30.8f, 63.5f, 63.4f, 63.3f, 63.2f, 63.1f, 63.0f, 62.9f, 62.8f, 62.7f, 49.2f,  5.9f, 91.5f, 84.7f, 51.0f, 50.9f, 50.8f, 50.7f, 50.6f, 50.7f, 50.8f, 50.9f, 51.0f, 78.7f, 36.4f, 59.9f, 95.3f, 44.9f, 44.8f, 44.7f, 44.6f, 44.5f, 44.4f, 44.3f, 44.2f, 44.1f, 83.6f, 25.9f, 32.1f, 11.1f, 67.5f, 67.4f, 67.3f, 67.2f, 67.1f, 67.2f, 67.3f, 67.4f, 67.5f, 52.7f, 98.0f, 19.5f, 60.7f, 28.1f, 28.0f, 27.9f, 27.8f, 27.7f, 27.8f, 27.9f, 28.0f, 28.1f, 70.7f, 54.5f, 13.5f, 77.1f, 41.2f, 41.1f, 41.0f, 40.9f, 40.8f, 40.7f, 40.6f, 40.5f, 40.4f, 59.4f, 90.0f,  6.7f, 85.4f, 69.5f, 69.6f, 69.7f, 69.8f, 69.9f, 70.0f, 70.1f, 70.2f, 70.3f, 38.0f, 12.4f, 95.2f, 57.1f, 50.4f, 50.3f, 50.2f, 50.1f, 50.0f, 49.9f, 49.8f, 49.7f, 49.6f, 61.7f, 27.6f, 43.1f, 83.8f, 73.4f, 73.5f, 73.6f, 73.7f, 73.8f, 73.7f, 73.6f, 73.5f, 73.4f, 16.3f, 97.2f, 21.5f, 66.2f, 47.1f, 47.2f, 47.3f, 47.4f, 47.5f, 47.4f, 47.3f, 47.2f, 47.1f, 33.5f, 76.3f, 42.9f,  4.3f, 62.4f, 62.3f, 62.2f, 62.1f, 62.0f, 61.9f, 61.8f, 61.7f, 61.6f, 82.4f, 24.4f, 58.4f,  9.7f, 90.4f, 90.3f, 90.2f, 90.1f, 90.0f, 89.9f, 89.8f, 89.7f, 89.6f, 34.9f, 14.7f, 30.2f, 96.2f, 52.4f, 52.3f, 52.2f, 52.1f, 52.0f, 51.9f, 51.8f, 51.7f, 51.6f, 71.8f, 59.2f, 10.6f, 84.2f, 63.7f, 63.8f, 63.9f, 64.0f, 64.1f, 64.0f, 63.9f, 63.8f, 63.7f, 46.6f, 18.2f, 45.4f, 82.0f, 78.6f, 78.5f, 78.4f, 78.3f, 78.2f, 78.3f, 78.4f, 78.5f, 78.6f, 95.4f, 32.6f, 23.3f, 68.8f, 41.8f, 41.7f, 41.6f, 41.5f, 41.4f, 41.3f, 41.2f, 41.1f, 41.0f, 58.9f, 27.4f, 56.1f, 88.7f, 50.8f, 50.9f, 51.0f, 51.1f, 51.2f, 51.1f, 51.0f, 50.9f, 50.8f, 12.9f, 72.1f, 33.3f, 67.9f, 74.9f, 74.8f, 74.7f, 74.6f, 74.5f, 74.6f, 74.7f, 74.8f, 74.9f, 49.0f, 21.9f, 61.2f, 93.6f, 55.3f, 55.2f, 55.1f, 55.0f, 55.1f, 55.2f, 55.3f, 55.4f, 55.5f, 43.4f, 61.0f, 47.3f, 47.2f, 47.3f, 47.4f
        };
        
        
        
        System.out.println(summaryRanges(nums));
    }
    
    public static List<String> summaryRanges(float[] nums) 
    {
        final float epsilon = 0.0005f;
        
        //I have chosen to start with a true value since I can forsee violation due to default being false
        boolean hasWrittenLastNumber=true;
        
        boolean isFirstOccurenceAscendingChain=false;
        boolean isFirstOccurenceAscendingChainNoTransition =false;
        
        List<String> sm = new ArrayList<>();
        int counter = 0;
        String start="";
        String end="";
        String temp="";
        String backupStart="";
        boolean hasTransition=false;
        String transitionNumber="";
        float difference=0.1f;

        if (nums.length==1)
        {
            sm.add(String.valueOf(nums[0]));
            System.out.println("1Writing Standalone: " + nums[0]);
            return sm;
        }

        for (int k=0; k<nums.length-1;k++)
        {
            if (k==0)
            {
                start=String.valueOf(nums[k]);
            }
            
            if (nums[k]!=nums[k+1])
            {
            
            System.out.println("CHECKING: " + nums[k] + " with " + nums[k+1]);
            System.out.println(nums[k]+difference);   //5.0
            System.out.println(nums[k]-difference);   //4.8
            
            
            
            //Math.abs(current - (prev + difference ))< epsilon
            //we need to understand which is current, prev
            //if nums[k] is current
            //Math.abs(4.9 - (4.8 + 0.1)) < 0.00005
            //if (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon)
            
            if (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon)
            //if ((nums[k]+difference)==(nums[k+1]))
            {
                if (counter==0)
                {
                    backupStart=String.valueOf(nums[k]);
                }
                
                if (counter==0 && (k==nums.length-2))
                {
                    start=String.valueOf(nums[k]);
                    end = String.valueOf(nums[k+1]);
                    sm.add(start+"->"+end);
                    System.out.println("5Writing range: " + start + "-> " + end); 
                    break;
                }
                
                if (counter!=0 && (k==nums.length-2))
                {
                    end=String.valueOf(nums[k+1]);
                    sm.add(start +"->"+end);
                    System.out.println("6Writing range: " + start + "-> " + end); 
                }

                if (counter==0)
                {
                     if (isFirstOccurenceAscendingChainNoTransition || isFirstOccurenceAscendingChain)
                    {
                        end=String.valueOf(nums[k]);
                        sm.add(start+"->"+end);
                        System.out.println("28Writing range: " + start + "-> " + end); 
                    }
                    
                    
                    start=String.valueOf(nums[k]);
                    System.out.println("Establishing start: " + start);
                    
                   
                    
                    
                    
                    if (k==nums.length-1)
                    {
                        System.out.println("2Writing Standalone: " + start);
                        sm.add(start);
                    }
                }
                counter++; 
            }
            else
            {
                if (k==nums.length-2)
                {
                    if (temp!="")
                    {
                        sm.add(temp);
                        System.out.println("9Writing range: " + temp);
                    }
                    
                    if (counter==0)
                    {
                             //descending
                             //checking 47.3  with 47.4 (this is not descending)
                             //so it enters the else
                        if (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon)
                        //if ((nums[k]-difference)==(nums[k+1]))
                        {
                            start=String.valueOf(nums[k]);
                            end = String.valueOf(nums[k+1]);
                            sm.add(start+"->"+end);
                            System.out.println("7Writing range: " + start + "-> " + end);
                        }
                        else
                        {
                            end = String.valueOf(nums[k]);   //it sets 47.3 as the end
                            
                            if (isFirstOccurenceAscendingChainNoTransition || isFirstOccurenceAscendingChain)
                            {
                                //shows next is ascending
                                            //72.8       //42.5
                                //we wrote this section of code when 
                                if (Math.abs(nums[k] - (nums[k+1] - difference)) <epsilon)
                                {
                                    end=String.valueOf(nums[k+1]);
                                      sm.add(start+"->"+end);
                                      System.out.println("35Writing range: " + start + "-> " + end); 
                                      hasWrittenLastNumber=false;
                                }
                                else
                                {
                                    end=String.valueOf(nums[k]);
                                    sm.add(start+"->"+end);
                                    System.out.println("27Writing range: " + start + "-> " + end); 
                                    //sm.add(String.valueOf(nums[k+1]));
                                }
                            }
                            else
                            {
                                
                            
                            if (temp=="")
                            {
                                System.out.println("3Writing Standalone: " + end);
                                sm.add(end);
                            }
                            }
                            
                            //it has written last number as part of the chain
                            //it has set the value to false above.......
                            //74.1f, 74.2f, 74.3f, 74.4f,(74.5f)
                            //so we enter here if the condition is true only......
                            //it is very difficult to give this a better name given naming convention boolean is or has.....
                            
                            if (hasWrittenLastNumber)
                            {
                                start=String.valueOf(nums[k+1]);
                                System.out.println("4Writing Standalone: " + start);
                                sm.add(start);
                                hasWrittenLastNumber=false;
                            }
                            
                        }
                    }
                    else   //we are here because counter!=0  and   k==nums.length-2
                            //with this data....   47.4f, 47.3f,47.4f,  it relates to 47.3f
                            //I have checked chatGPT and my code has not entered this section
                    {
                        System.out.println("MUST BE HERE SO TRANSITION PART NOT PRESENT");
                        System.out.println("HAT IS START: " + start);
                        end=String.valueOf(nums[k]);
                        sm.add(start+"->"+end);
                        System.out.println("3Writing range: " + start + "-> " + end);
                        
                        //here we know there is only one value after current one... we need to check if it is descending or ascending
                        //and then formulate the closure
                        //
                        
                        //it needs to pass one of these scenarios, no effect on start or end
                        //checking 47.3 with 47.4 
                                      //descending                                                //ascending
                        if ( (Math.abs(nums[k] - (nums[k+1] - difference)) <epsilon)   ||   
                              (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon))
                        {
                            start=String.valueOf(nums[k]);
                            end=String.valueOf(nums[k+1]);
                            sm.add(start+"->"+end);
                            System.out.println("49Writing range: " + start + "-> " + end);
                            
                        }
                        //NO IDEA WHy THIS WAS INCLUDED
                        //sm.add(String.valueOf(nums[k+1]));
                    }
                }
                else       //   (k!=nums.length-2)
                {
                    //descending
                    if (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon)
                    //if ((nums[k]-difference)==(nums[k+1]))
                    {
                        end=String.valueOf(nums[k+1]);
                    }
                    else
                    {
                        end=String.valueOf(nums[k]);
                    }
                    if (counter==0)
                    {
                        if(k==0)
                        {
                            //descending
                            //I am extremely hesitant to start performing and ascending check here
                            //since I have no idea if my code has entered here before due to lack of screen outputs
                            //we know for an array such as  (47.3), 47.4 and 47.3, it will not enter here on the 1st element
                            if (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon)
                            //if ((nums[k]-difference)==(nums[k+1]))
                            {
                                start=String.valueOf(nums[k]);
                                counter++;
                            }
                            else   //since confident code has not entered here, I will place logic here
                            {
                                //ascending
                                if (Math.abs(nums[k] - (nums[k+1] - difference)) <epsilon)
                                {
                                    start=String.valueOf(nums[k]);
                                    end=String.valueOf(nums[k+1]);
                                    sm.add(start+"->"+end);
                                    System.out.println("58Writing range: " + start + "-> " + end);
                                }
                                else
                                {
                                System.out.println("5Writing standalone: " + start);
                                sm.add(start);
                                }
                            }
                        }
                        else
                        {
                            if (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon)
                            //if ((nums[k]-difference)==(nums[k+1]))
                            {
                                if (temp=="")
                                {
                                    if (Math.abs(nums[k] - (nums[k-1] + difference)) <epsilon)
                                    //if ((nums[k-1]-difference)==(nums[k]))
                                    {
                                        backupStart=String.valueOf(nums[k-1]);
                                    }
                                    else
                                    {
                                        backupStart=String.valueOf(nums[k]);
                                    }
                                    
                                    temp=backupStart+"->"+end;
                                    hasTransition=false;
                                }
                                else
                                {
                                    end=String.valueOf(nums[k+1]);
                                    temp=backupStart+"->"+end;
                                    hasTransition=false;
                                }
                                System.out.println("8Storing range: " + temp);
                            }
                            else
                            {
                                if (temp!="")
                                {
                                    sm.add(temp);
                                    System.out.println("8Writing range: " + temp);
                                    temp="";
                                    backupStart="";
                                }
                                
                                
                                else
                                {
                                    //to ensure a standalone does not enter the else loop, the first part determines relationship
                                    //with nums[k-1] but we need to forge connection with nums[k+1]
                                    //ie if nums[k] + difference is  within tolerance of nums[k+1]  ie still ascending
                                    
                                    
                                  //                4.5       4.7       //suggesting ascending, not applicable 
                                    if ((Math.abs(nums[k] - (nums[k-1] + difference)) <epsilon)
                                    
                                //              4.6                        4.5       //this is applicable
                                    ||   (Math.abs(nums[k+1] - (nums[k] + difference)) <epsilon))
                                    //if ((nums[k-1]-difference)==(nums[k]))
                                    {
                                        
                                        //ultimately we know that sequence is 4.7,   (4.5),    4.6
                                        //so what makes it different to  4.7,    (4.6), 4.7, 4.8....
                                        
                                                                                //we are still interested in the start only once, but this time it would be
                                        //nums[k]
                                        //we know the below loop wont allow entry due to 4.7,   (4.5),    4.6
                                        //so I can lessen the scope first to check if nums[k+1]+diff >=nums[k]
                                        //to establish start once....
                                        //and then if it goes into the wider scope for
                                        //4.7,    (4.6), 4.7, 4.8....  it would get nums[k-1] to represent the transition...
                                        
                                        //we know it would enter here for cases such as  4.6->4.7
                                        
                                        //String backupEnd = end;            //this would be 4.6 value before
                                        end = String.valueOf(nums[k]);
                                        
                                        //since for ascending, we are getting entries such as
                                        //4.6->4.7, 4.7->4.8, 4.8->4.9, 4.9->5.0
                                        //we need to merge summary range together again
                                        
                                         //4.9f, 4.8f, 4.7f, 4.6f,        4.7f, 4.8f, 4.9f, 5.0f, 48.5f, 91.7f
                                        
                                        System.out.println("This is start: " + start);
                                        
                                        //here we know we are in ascending area....
                                        //so we need to check using epsilon if the prev is less than current
                                        //within margin of error 
                                        
                                        //this logic suggests previous number is lower since addding difference
                                        //it also has to ensure the front is increasing by difference, in which case we have to subtract difference from nums[k+1]
                                        //also need to find a way of not keep obtaining the start...
                                        //it would only get the start on the first instance of the below if loop
                                        //for instance we want start to remain as 4.6f and not be adjusted everytime nums[k] increases
                                        
                                        //4.6f,        4.7f, 4.8f, 4.9f, 5.0f,
                                        
                                                   
                                                  // 4.5                 4.6       narrow scope
                                                  
                                        if  (Math.abs(nums[k] - (nums[k+1] - difference))<epsilon)
                                        {
                                            if (!isFirstOccurenceAscendingChainNoTransition)
                                            {
                                                start=String.valueOf(nums[k]);  //4.5
                                                System.out.println("1BUT ACKNOWLEDGED START: " + start);
                                                
                                                //need to lock this loop until else has reached
                                                isFirstOccurenceAscendingChainNoTransition=true;
                                            }
                                        
                                        
                                        //wider scope
                                        //this is basically showing that ascending sequence.....
                                        //we know it breaks away from this when the next number is out of consecutive sequence...
                                        //but we need to include logic if the ascending transitions to descending...
                                        //otherwise it will fail circumstances such as since it has identified break of ascending at 78.0f
                                        //unfortunately it can not go into else since its not part of the same block area...
                                        
                                        
                                        //77.7f, 77.8f, 77.9f, 78.0f, 78.1f, (78.0f), 77.9f, 77.8f, 77.7f,     

                                        
                                        
                                        if ((Math.abs(nums[k] - (nums[k-1] + difference)) <epsilon)  
                                        &&   (Math.abs(nums[k] - (nums[k+1] - difference))<epsilon))
                                        {
                                            System.out.println("DO NOTHING******************");
                                            
                                            if (!isFirstOccurenceAscendingChain)
                                            {
                                                start=String.valueOf(nums[k-1]);  //4.6
                                                System.out.println("2BUT ACKNOWLEDGED START: " + start);
                                                
                                                //need to lock this loop until else has reached
                                                isFirstOccurenceAscendingChain=true;
                                            }
                                        }
                                    }
                                        
                                        else
                                        {
                                            System.out.println("BREAKING FLOW--------------------------------------------------------");
                                            isFirstOccurenceAscendingChain=false;
                                            isFirstOccurenceAscendingChainNoTransition=false;
                                            System.out.println("**************************");
                                            sm.add(start+"->"+end);
                                            System.out.println("11Writing range: " + start+"->"+end);
                                        }
                                    }  //else opposing 8write rangey
                                    
                                    
                                    else
                                    {
                                        start = String.valueOf(nums[k]);
                                        sm.add(start);
                                        System.out.println("6Writing Standalone: " + start);
                                        isFirstOccurenceAscendingChain=false;
                                        isFirstOccurenceAscendingChainNoTransition=false;
                                    }
                                }  //wide else
                            }
                        }
                    }
                    else
                    {
                        if ((Math.abs(nums[k] - (nums[k-1] + difference)) <epsilon)  && (Math.abs(nums[k] - (nums[k+1] + difference)) <epsilon))
                        //if ((nums[k-1]+difference)==(nums[k]) &&  (nums[k])==(nums[k+1])+difference)
                        {
                            end=String.valueOf(nums[k]);
                            sm.add(backupStart+"->"+end);
                            System.out.println("10Writing range: " + backupStart+"->"+end);
                            hasTransition=true;
                            transitionNumber=String.valueOf(nums[k]);
                        }
                        if (!hasTransition)
                        {
                            if (temp!="")
                            {
                                end=String.valueOf(nums[k+1]);
                                sm.add(start+"->"+end);
                            }
                            else
                            {
                                System.out.println("2Writing range: " + start + "-> " + end); 
                                sm.add(start+"->"+end);
                            }
                        }
                        counter=0;
                        temp="";
                        backupStart="";
                        hasTransition=false;
                    }
                }
            }
        }
    }
        return sm;
    }
}

