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.*;
import java.math.BigInteger;

/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author Togrul Gasimov
*/
public class Main {
  public static void main(String[] args) {
      InputStream inputStream = System.in;
      OutputStream outputStream = System.out;
      FastScanner scan = new FastScanner(inputStream);
      FastPrinter out = new FastPrinter(outputStream);
      TaskA solver = new TaskA();
      solver.solve(1, scan, out);
      out.close();
  }
}
 
class TaskA {
  
	boolean polindorme(String s){
		int r = s.length();
		for(int i = 0; i <= s.length() / 2; i ++){
			r--;
			if(s.charAt(r) != s.charAt(i)) return false;
		}
		
		return true;
	}
  
  public void solve(int testNumber, FastScanner scan, FastPrinter out) {
     
   String s = scan.readLine();
   int S = Integer.parseInt(s.substring(0, 2)), D = Integer.parseInt(s.substring(3));
   s += ":";
    while( !polindorme(s)){
    	D++;
    	if(D == 60){
    	 D = 0; S++;
    	}
    	if(S > 23){
    		S = 0;
    	}
    	if(S < 10){
    		s = "0" + S + ":";
    	}else {
    		s = S + ":";
    	}
    	if(D < 10){
    		s += "0" + D;
    	}else{
    		s += "" + D;
    	}
    }
    out.println(s);
    
    
}
}
class FastScanner extends BufferedReader {

  public FastScanner(InputStream is) {
      super(new InputStreamReader(is));
  }

  public int read() {
      try {
          int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
          return ret;
      } catch (IOException e) {
          throw new InputMismatchException();
      }
  }

  static boolean isWhiteSpace(int c) {
      return c >= 0 && c <= 32;
  }

  public int nextInt() {
      int c = read();
      while (isWhiteSpace(c)) {
          c = read();
      }
      int sgn = 1;
      if (c == '-') {
          sgn = -1;
          c = read();
      }
      int ret = 0;
      while (c >= 0 && !isWhiteSpace(c)) {
          if (c < '0' || c > '9') {
              throw new NumberFormatException("digit expected " + (char) c
                      + " found");
          }
          ret = ret * 10 + c - '0';
          c = read();
      }
      return ret * sgn;
  }

  public String readLine() {
      try {
          return super.readLine();
      } catch (IOException e) {
          return null;
      }
  }

  public int[] readIntArray(int n) {
      int[] ret = new int[n + 1];
      for (int i = 1; i <= n; i++) {
          ret[i] = nextInt();
      }
      return ret;
  }

  }

class FastPrinter extends PrintWriter {

  public FastPrinter(OutputStream out) {
      super(out);
  }

  public FastPrinter(Writer out) {
      super(out);
  }


}