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.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author saket
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		PalindromicTimes solver = new PalindromicTimes();
		solver.solve(1, in, out);
		out.close();
	}
}

class PalindromicTimes {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        String s[]=in.readLine().split(":");
        String num=s[0]+s[1];
        int date=Integer.parseInt(num);
        String ans="";
        String part1="";
        String part2="";
        while (true)
            {
                date++;
                if(date>2332)
                {
                    out.printLine("00:00");
                    return;
                }
                String temp=""+date;
                String checker="";
                if(temp.length()==3)
                {
                    checker=temp.substring(1,temp.length());
                    part1="0"+temp.substring(0,1);
                    part2=temp.substring(1,temp.length());
                }
                else if(temp.length()!=1){
                    checker=temp.substring(2,temp.length());
                    
                    part1=temp.substring(0,2);
                    part2=temp.substring(2,temp.length());
                }
                if(checker.equals(""))
                    continue;
                if(new Integer(checker)>59)
                {
                    String dd=(new Integer(part1)+1)+"";
                    String mm="00";
                    part1=dd.length()==1?"0"+dd:dd;
                    part2=mm;
                    date=new Integer(part1+part2);
                }
                if(checkPalin(part1+part2))
                    break;
            }
            out.printLine(part1+":"+part2);
        }
    private boolean checkPalin(String s) {

        for(int i=0;i<s.length();i++)
            if(s.charAt(i)!=s.charAt(s.length()-i-1))
                return false;
        return true;
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    private String readLine0() {
        StringBuilder buf = new StringBuilder();
        int c = read();
        while (c != '\n' && c != -1) {
            if (c != '\r')
                buf.appendCodePoint(c);
            c = read();
        }
        return buf.toString();
    }

    public String readLine() {
        String s = readLine0();
        while (s.trim().length() == 0)
            s = readLine0();
        return s;
    }

}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }
    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

