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.util.*;

import java.io.*;
public class main {
static FastScanner sc;
static PrintWriter pw;
static void pn(Object o){pw.println(o);}
static void p(Object o){pw.print(o);}

    public static void main(String[] args) {
//	        Scanner sc = new Scanner(System.in);
    		sc = new FastScanner();
    		pw = new PrintWriter(System.out);
    
//	        int t = sc.ni();
//	        while(t-->0)
//	        {
//	        }
 
    		String[] s = sc.next().split(":");
    		int h = Integer.valueOf(s[0]),m=Integer.valueOf(s[1])+1,fg=0;
    		String i="",j="";
    		if(m==60)
			{
				h++;
				if(h<10)
				{
					i="0"+h;
				}
				else i=h+"";
				m=00;
				if(m<10)
				{
					j="0"+m+"";
				}
				else j=m+"";
			}

    		i=(h<10)?"0"+h:h+"";j=m+"";
//    		pn(h+" "+m+" "+i+" "+j);
    		while(!isPalindrome(i,j))
    		{
    			m++;
    			if(m<10)j="0"+m;else j = m+"";
//    			pn(i+" "+j);
    			if(m==60)
    			{
    				h++;
    				if(h<10)
    				{
    					i="0"+h;
    				}
    				else i=h+"";
    				m=00;
    				if(m<10)
    				{
    					j="0"+m+"";
    				}
    				else j=m+"";
    			}
    			if(h==24) {h=00;m=00;i="00";j="00";}
    		}
    		pn((h!=0&&m!=0)?i+":"+j:"00:00");
	        pw.close();
    }
    static boolean isPalindrome(String a, String b)
    {
    	String x= "";
    	for(int i=0;i<b.length();i++)
    	{
    		x = b.charAt(i)+x;
    	}
    	if(x.equals(a))return true;
    	else return false;
    }
    static int[] reverse(int a[]){

    	for(int i=0;i<a.length/2;i++)
    	{
    	   int temp = a[i];
    	   a[i] = a[a.length-i-1];
    	   a[a.length-i-1] = temp;
    	}

    	return a;

    	}
//    static String swap(int n,String s)
//    {
//    	String ans = "";
//    	
//    	for(int i=0;i<s.length();i++)
//    	{
//    		if(i==n)
//    		{
//    			ans += s.charAt(i+1);
//    			ans += s.charAt(i);
//    			continue;
//    		}
//    		ans += s.charAt(i);
//    		
//    	}
//    	return ans;
//    }


    static boolean check(int[][] a,int n,int m)
    {
    	for(int i=1;i<=n;i++)
    	{
    		for(int j=1;j<=m;j++)if(a[i][j]!=-1)return false;
    	}
    	return true;
    }
//    static boolean check2(int n,int d)
//    {
//    	while(n>d)
//		{
//				n -=d;
//				if(check(n,d))return true;
//		}
//    	return false;
//    }
//    static int sum(int n)
//    {
//    	if(n>=10)return n;
//    	else
//    	{
//    		sum(n);
//    	}
//    }
    
    static int gcd(int a,int b)
    {
    	if(b!=0)return gcd(b,a%b);
    	else return a;
    }
    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in), 32768);
            st = null;
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int ni() {
            return Integer.parseInt(next());
        }
 
        int[] intArray(int N) {
            int[] ret = new int[N];
            for (int i = 0; i < N; i++)
                ret[i] = ni();
            return ret;
        }
 
        long nl() {
            return Long.parseLong(next());
        }
 
        long[] longArray(int N) {
            long[] ret = new long[N];
            for (int i = 0; i < N; i++)
                ret[i] = nl();
            return ret;
        }
 
        double nd() {
            return Double.parseDouble(next());
        }
 
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}