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.*;
import static java.util.Arrays.*;

/**
 * Created by IntelliJ IDEA.
 * User: kazakoval
 * Date: 30.08.2012
 * Time: 12:06:29
 * To change this template use File | Settings | File Templates.
 */
public class Solution implements Runnable {

    private StreamTokenizer token;

    private BufferedReader in;

    private PrintStream out;

    public static void main(String[] args) {
        new Thread(new Solution()).start();
    }

    private void solve() throws Exception {
        String str = getLine();
        char c1 = str.charAt(1);
        char c0 = str.charAt(0);
        char c3 = str.charAt(3);
        char c4 = str.charAt(4);
        int h = Integer.parseInt(str.substring(0,2));
        int m = Integer.parseInt(str.substring(3));
        if ((h>5 && h<10) || (h==5 && m>49)){
            print("10:01");
            return;
        }
        if ((h>15 && h<20) || (h==15 && m>50) ){
            print("20:02");
            return;
        }
        if (((byte)c0 -48) + ((byte)c1-48)*10 > m){
            print(c0);
            print(c1);
            print(':');
            print(c1);
            print(c0);
        } else {
            h = (h +1) % 24;
            String hh = Integer.toString(h);
            String s = (h<10)? "0"+hh+":"+hh+"0":hh+":"+hh.charAt(1)+hh.charAt(0);
            print(s);
        }
        /*if (c0=='0' && c1>='6' && c1<='9'){
            print("10:01");
            return;
        }
        if (c0=='1' && c1>='6' && c1<='9'){
            print("20:02");
            return;
        }
        if (c0=='2' && c1=='4' && c3>='4' & c4>='2'){
            print("00:00");
            return;
        }
        if (c1>c3 || (c1==c3 && c0>c4)){
            print(new StringBuilder().append(c0).append(c1).append(':').append(c1).append(c0).toString());
            return;
        }*/
    }

    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            token = new StreamTokenizer(in);
            out = System.out;
            solve();
            out.flush();
            in.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private int getInt() throws IOException {
        token.nextToken();
        return (int) (token.nval);
    }

    private long getLong() throws IOException {
        token.nextToken();
        return (long) (token.nval);
    }

    private double getDouble() throws IOException {
        token.nextToken();
        return token.nval;
    }

    private String getString() throws IOException {
        token.nextToken();
        return token.sval;
    }

    private void print(int x) throws Exception {
        out.print(x);
    }

    private void print(long x) throws Exception {
        out.print(x);
    }

    private void print(byte x) throws Exception {
        out.print(x);
    }

    private void print(char x) throws Exception {
        out.print(x);
    }

    private void print(double x) throws Exception {
        out.print(x);
    }

    private void print(String x) throws Exception {
        out.print(x);
    }

    private void print(boolean x) throws Exception {
        out.print(x);
    }

    private void print(int[] x) throws Exception {
        for (int y : x) {
            out.print(y);
            out.print(" ");
        }
    }

    private void print(byte[] x) throws Exception {
        for (byte y : x) {
            out.print(y);
            out.print(" ");
        }
    }

    private void print(double[] x) throws Exception {
        for (double y : x) {
            out.print(y);
            out.print(" ");
        }
    }

    private void print(boolean[] x) throws Exception {
        for (boolean y : x) {
            out.print(y);
            out.print(" ");
        }
    }

    private void println(int x) throws Exception {
        out.println(x);
    }

    private void println(double x) throws Exception {
        out.println(x);
    }

    private void println(String x) throws Exception {
        out.println(x);
    }

    private void println(boolean x) throws Exception {
        out.println(x);
    }

    private void println(int[] x) throws Exception {
        for (int y : x) {
            out.println(y);
        }
    }

    private void println(double[] x) throws Exception {
        for (double y : x) {
            out.println(y);
        }
    }

    private int[] getIntArray(int n) throws Exception {
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = getInt();
        }
        return array;
    }

    private long[] getLongArray(int n) throws Exception {
        long[] array = new long[n];
        for (int i = 0; i < n; i++) {
            array[i] = getLong();
        }
        return array;
    }

    private double[] getDoubleArray(int n) throws Exception {
        double[] array = new double[n];
        for (int i = 0; i < n; i++) {
            array[i] = getDouble();
        }
        return array;
    }

    private String getLine() throws Exception {
        return in.readLine();
    }
}
