Tattah is asleep if and only if Tattah is attending a lecture. This is a well-known formula among Tattah's colleagues.

On a Wednesday afternoon, Tattah was attending Professor HH's lecture. At 12:21, right before falling asleep, he was staring at the digital watch around Saher's wrist. He noticed that the digits on the clock were the same when read from both directions i.e. a palindrome.

In his sleep, he started dreaming about such rare moments of the day when the time displayed on a digital clock is a palindrome. As soon as he woke up, he felt destined to write a program that finds the next such moment.

However, he still hasn't mastered the skill of programming while sleeping, so your task is to help him.

Input

The first and only line of the input starts with a string with the format "HH:MM" where "HH" is from "00" to "23" and "MM" is from "00" to "59". Both "HH" and "MM" have exactly two digits.

Output

Print the palindromic time of day that comes soonest after the time given in the input. If the input time is palindromic, output the soonest palindromic time after the input time.

Examples

Input

12:21


Output

13:31


Input

23:59


Output

00:00
import java.io.*;
import java.util.*;

public class Main
{  
    static boolean isPanlindrome(int h, int m)
    {
        if(h == 0 && m == 0) return true;
        
        String str1 = "", str2 = "";
        int cnt = 2;
        while(cnt-- > 0)
        {
            str1 += (char) (h%10 + '0');
            str2 += (char) (m%10 + '0');
            h /= 10;
            m /= 10;
        }
        if(str1.charAt(0) == str2.charAt(1) && str1.charAt(1) == str2.charAt(0)) return true;
        return false;
    }
    
    public static void main(String[] args) throws IOException 
	{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		//StringTokenizer st = new StringTokenizer(br.readLine());
        //int n = Integer.parseInt(st.nextToken()), lst = 0, crr = 0, cnt= 0, moves = 0;
        
        String[] time = br.readLine().split(":");
        int hour = Integer.parseInt(time[0]);
        int mins = Integer.parseInt(time[1]);
        while(true)
        {
            mins = (mins+1)%60;
            if(mins == 0) hour = (hour+1)%24;
            if(isPanlindrome(hour,mins)) break;
        }
        if(hour == 0 && mins == 0) System.out.println("00:00");
        else System.out.println((hour /10 == 0? ("0" + hour) : hour) + ":" +(mins /10 == 0? ("0" + mins) : mins));
    }

    static double getDistanceBetweenTwoPoints(int x1, int y1, int x2, int y2){
        return Math.sqrt(Math.pow(x2-x1,2) + Math.pow(y2-y1,2));
    }

    static int[] countLetterFreqeuncy(String str){
        int[] ltrs = new int[26];
        for(int i=0; i<str.length(); i++)
            ltrs[(int) (str.charAt(i) - 'A')]++;
        return ltrs;
    }
	
    static long gcd(long a, long b) { 
        if (a == 0) 
            return b;  
        return gcd(b % a, a);  
    } 
      
    static long lcm(long a, long b) { 
        return (a*b)/
        gcd(a, b); 
    } 

    // Arrays.sort(arr, new Comparator<Integer[]>() {
    //     @Override
    //             //arguments to this method represent the arrays to be sorted   
    //     public int compare(Integer[] arr1, Integer[] arr2) {
    //             //get the item ids which are at index 0 of the array
    //             Integer item1 = arr1[0];
    //             Integer item2 = arr2[0];
    //         // sort based on price
    //         return item1.compareTo(item2);
    //     }
    // });

    //String.join("", Collections.nCopies(n-1, "");
    
    //sort the String ArrayList (ignore the case)
    //Collections.sort(swStrArr, String.CASE_INSENSITIVE_ORDER);
    
    static int binarySearch(int left, int right, int find, int[] arr){
        int mid = left + (right-left)/2;
        if(find == arr[mid]) return mid;
        else if(find < arr[mid]) return binarySearch(left,mid-1,find,arr);
        else return binarySearch(mid+1,right,find,arr);
    }

    static ArrayList<Integer> separateDigits(int num){
         int pow = 0;
         ArrayList<Integer> arr = new ArrayList<>();
         while(num != 0)
         {
             if(num % 10 != 0)
             {
                 arr.add((num % 10) * (int) Math.pow(10, pow));
             }
             num /= 10;
             pow++;
         }
         return arr;
     }

    //Find pattern using multiplication
    // static int countNumOfPattern(char[][] matrix)
    // {
    //     //based on the size of pattern, nxm
    //     int cnt = 0;
    //     for(int i = 0; i<matrix.length; i++)
    //     {
    //         for(int j = 0; j<matrix[0].length; j++)
    //         {
    //             if(matrix[i][j] * matrix[i+1][j] * matrix[i][j+1] * matrix[i+1][j+1] == "The pattern")
    //                 cnt++;
    //         }
    //     }
    // }
    
    //Kadane’s Algorithm - find maximum subarray
    static int findMaxSubSum(int[] arr)
    {
        int crrMax = 0, fnlMax = 0;
        for(int i=0; i<arr.length; i++)
        {
            crrMax = Math.max(arr[i], arr[i] + crrMax);
            fnlMax = Math.max(crrMax, fnlMax);
        }
        return fnlMax;
    }
    
    
}












