#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string time;
  cin >> time;
  int hr = stoi(time.substr(0, 2)), minute = stoi(time.substr(3, 2));
  minute++;
  if (minute == 60) {
    minute = 0;
    hr++;
    if (hr == 24) hr = 0;
  }
  while (minute / 10 + (minute % 10) * 10 != hr) {
    minute++;
    if (minute == 60) {
      minute = 0;
      hr++;
      if (hr == 24) hr = 0;
    }
  }
  string ans;
  if (minute == 0 && hr == 0)
    ans = "00:00";
  else {
    if (hr < 10) ans = "0";
    ans = ans + to_string(hr) + ":";
    if (minute < 10) ans = ans + "0";
    ans = ans + to_string(minute);
  }
  cout << ans << '\n';
  return 0;
}
