Keys, Phone, Wallet

시간 제한1초메모리 제한2048 MB

요약
최대 20개의 가져간 물건 이름이 주어질 때, keys, phone, wallet 중 없는 것을 알파벳 순서로 출력하고 모두 있으면 ready를 출력한다.
난이도

쉬움10점 중 2점

유형
구현, 해시맵, 정렬
정답자
아직 제출이 없습니다

문제

Oh no, you slept in and have to rush to get to work on time! It is also very cold outside!

In your rush to put on Winter gear and leave home quickly, you wonder if you forgot your keys, phone, or wallet. You had better check.

입력

The first line of input contains a single integer NN (1≤N≤201≤N≤20) indicating the number of items you grabbed before heading out the door.

The next NN lines each contain a single nonempty string of lowercase letters with length at most 1010 indicating an item you grabbed before heading out the door. No two strings will be the same.

출력

Output each of keys, phone, and wallet that does not appear in the input, one per line and in alphabetic order. If you did not forget any of these items, simply print a single line with the text ready.

예제3

  1. 예제 1

    입력
    4
    jacket
    gloves
    wallet
    keys
    
    예상 출력
    phone
    
  2. 예제 2

    입력
    4
    phone
    toque
    wallet
    keys
    
    예상 출력
    ready
    
  3. 예제 3

    입력
    5
    scarf
    jacket
    gloves
    snowpants
    shades
    
    예상 출력
    keys
    phone
    wallet