시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
3 초 256 MB 315 179 168 56.949%

문제

팬그램은 모든 알파벳을 적어도 한 번씩을 사용한 영어 문장을 말한다.

다음은 유명한 팬그램 중 하나이다.

The quick brown fox jumps over a lazy dog

더블 팬그램은 모든 알파벳을 적어도 두 번씩은 사용한 문장을 말하고,

트리플 팬그램은 모든 알파벳을 적어도 세 번씩은 사용한 문장을 말한다.

더 이어나갈 수도 있겠지만 시간상 여기까지만 하도록 하겠다.

입력

입력은 여러 줄의 테스트케이스들로 이루어진다.

첫째 줄에 테스트케이스의 수 n이 주어진다.

각 테스트케이스는 영어 소문자와 대문자, 특수기호들로 이루어진다.

출력

각 케이스마다 한 줄에 하나씩 다음 중 하나를 출력한다.

  • 팬그램이 아닐 경우 - Not a pangram
  • 팬그램일 경우 - Pangram!
  • 더블 팬그램일 경우 - Double pangram!!
  • 트리플 팬그램일 경우 - Triple pangram!!!

트리플 팬그램일 경우에는 자연스럽게 팬그램과 더블 팬그램이 되지만, Triple pangram!!!만을 출력한다. 더블 팬그램도 마찬가지이다.

예제 입력 1

3
The quick brown fox jumps over a lazy dog.
The quick brown fox jumps over a laconic dog.
abcdefghijklmNOPQRSTUVWXYZ-zyxwvutsrqpon   2013/2014      MLKJIHGFEDCBA

예제 출력 1

Case 1: Pangram!
Case 2: Not a pangram
Case 3: Double pangram!!
W3sicHJvYmxlbV9pZCI6IjEwMzg0IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVkMzJjXHVhZGY4XHViN2E4IiwiZGVzY3JpcHRpb24iOiI8cD5cdWQzMmNcdWFkZjhcdWI3YThcdWM3NDAgXHViYWE4XHViNGUwIFx1YzU0Y1x1ZDMwY1x1YmNiM1x1Yzc0NCBcdWM4MDFcdWM1YjRcdWIzYzQgXHVkNTVjIFx1YmM4OFx1YzUyOVx1Yzc0NCBcdWMwYWNcdWM2YTlcdWQ1NWMgXHVjNjAxXHVjNWI0IFx1YmIzOFx1Yzdh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