#include <bits/stdc++.h>
int main() {
  int a, b, c, d;
  char str[100];
  while ((scanf("%s", str)) == 1) {
    a = str[0] - 48;
    b = str[1] - 48;
    b = a * 10 + b;
    c = str[3] - 48;
    d = str[4] - 48;
    d = c * 10 + d;
    while (1) {
      d = d + 1;
      if (d == 60) {
        d = 0;
        b++;
      }
      if (b == 24) b = 0;
      int x;
      x = (d % 10) * 10 + d / 10;
      int y = (b % 10) * 10 + b / 10;
      if (x == b && y == d) {
        if (x < 9) printf("0");
        printf("%d:", x);
        if (y < 9) printf("0");
        printf("%d\n", y);
        break;
      }
    }
  }
}
