题目描述
Problem Description
The YYYY/MM/DD format is one way to denote dates, where a zero-padded 4-digit year, a zero-padded 2-digit month, and a zero-padded 2-digit day are separated by slashes. For example, January 1, 2022, is represented as 2022/01/01.
A date is called good when the digits that appear in its YYYY/MM/DD format are of no more than 2 different types.
You are given a date $ S $ in the YYYY/MM/DD format. Output the first good date that appears after $ S $ in the YYYY/MM/DD format.
Note that the Gregorian calendar (the calendar currently used in Japan and many other countries) is assumed.
Input Format
The input is given from the standard input in the following format:
$ S $
Output Format
Output the answer in the YYYY/MM/DD format.
Sample Input and Output
Sample Input #1
2022/01/01
Sample Output #1
2022/02/02
Sample Input #2
2002/02/22
Sample Output #2
2002/02/22
Sample Input #3
2002/02/23
Sample Output #3
2020/02/02
Sample Input #4
2999/12/31
Sample Output #4
3000/03/03
Notes/Hints
Constraints
- $ S $ is a date that appears in the Gregorian calendar.
- $ S $ is given in the YYYY/MM/DD format.
- $ S $ is between January 1, 2001, and December 31, 2999, inclusive.
Sample Explanation 1
After $ S = $ January 1, 2022, February 2, 2022, is the first date that satisfies the condition. For example, February 22, 2222, also satisfies the condition of being after $ S $, but it is a later date than February 2, 2022, and thus does not satisfy the condition of being the first appearance.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分