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.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

import javax.net.ssl.SSLContext;

import static java.lang.Math.*;

public class Testt {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public static void mergeSort(int[] a) {
        mergeSort(a, 0, a.length - 1);
    }

    private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
        final int MAGIC_VALUE = 50;
        if (leftIndex < rightIndex) {
            if (rightIndex - leftIndex <= MAGIC_VALUE) {
                insertionSort(a, leftIndex, rightIndex);
            } else {
                int middleIndex = (leftIndex + rightIndex) / 2;
                mergeSort(a, leftIndex, middleIndex);
                mergeSort(a, middleIndex + 1, rightIndex);
                merge(a, leftIndex, middleIndex, rightIndex);
            }
        }
    }

    private static void merge(int[] a, int leftIndex, int middleIndex,
            int rightIndex) {
        int length1 = middleIndex - leftIndex + 1;
        int length2 = rightIndex - middleIndex;
        int[] leftArray = new int[length1];
        int[] rightArray = new int[length2];
        System.arraycopy(a, leftIndex, leftArray, 0, length1);
        System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
        for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
            if (i == length1) {
                a[k] = rightArray[j++];
            } else if (j == length2) {
                a[k] = leftArray[i++];
            } else {
                a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++]
                        : rightArray[j++];
            }
        }
    }

    private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
        for (int i = leftIndex + 1; i <= rightIndex; i++) {
            int current = a[i];
            int j = i - 1;
            while (j >= leftIndex && a[j] > current) {
                a[j + 1] = a[j];
                j--;
            }
            a[j + 1] = current;
        }
    }

    public static void main(String[] args) {
        new Testt().run();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    int mini = Integer.MAX_VALUE;
    int maxi = Integer.MIN_VALUE;
    int ans = 0;
    int ans2 = 0;
    final double esp = 1e-9;

    // solve !
    void solve() throws IOException {
        char[] c = in.readLine().toCharArray();
        int a[] = new int[4];
        a[0] = c[0] - '0';
        a[1] = c[1] - '0';
        a[2] = c[3] - '0';
        a[3] = c[4] - '0';
        int h = a[0] * 10 + a[1];
        int m = a[2] * 10 + a[3];
        if (h > 15  &&  h<20) {
            out.print("20:02");
            return;
        }
        if (h==15 && m>=51){
            out.print("20:02");
            return;
        }
        if (h==23 && m>=32){
            out.print("00:00");
            return;
        }
        if (h>=6 && h<10) {
            out.print("10:01");
            return;
        }
        String s="";
        int h2=a[1]*10+a[0];
        if (h2>m) {
            s ="";
            s+=c[0];
            s+=c[1];
            out.print(s+":"+c[1]+c[0]);
        }
        else {
            h++;
            if (h<10) {
                 s ="0";
                        s+=Integer.toString(h);
            }
            else {
            s = Integer.toString(h);
            }
            out.print(s+":"+s.charAt(1)+s.charAt(0));
        }
        
        
        
        
        
        
        
        ///sasasasasa
        
        
        
        
        
        
        
        
        
        
        
        
    }
}
