Alarm Clock | 프로그래밍의 벗 PivotOJ
PivotOJ

Alarm Clock

시간 제한: 2000ms메모리 제한: 256MB출처: NEERC Northern Subregional 2014BOJ 10372
이 문제는 본문 이미지 일부가 표시되지 않습니다. 텍스트만으로 풀이가 어려울 수 있습니다.

문제

Alice likes her digital alarm clock. She sets them up every evening. Last night Alice had a dream about her clock. Unfortunately, the only thing she is able to remember is the number of highlighted segments of the clock. Alice wonders what time was set on the clock in her dream.

Alice’s clock have four digits: two for hours and two for minutes. For example, the clock below shows 9:30 (note the leading zero).

[이미지 1]

The clock uses following digit representation.

[이미지 2]

입력

The only line of the input file contains single integer n — the number of highlighted segments of the clock in Alice’s dream (0 ≤ n ≤ 30).

출력

Output five characters in “hh:mm” format — the time shown on the clock in Alice’s dream. The time must be correct: 0 ≤ hh < 24 and 0 ≤ mm < 60. If there are many possible correct times, output any of them. If there is none, output “Impossible”.

예제

예제 1

입력
23
출력
09:30

예제 2

입력
28
출력
Impossible

예제 3

입력
2
출력
Impossible
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.