This page is still under construction.

Parts of this page are still being built. What you see may change.

Yeongil's Ideal Type

Time limit1sMemory limit512 MB

Summary
Given Yeongil's four-letter MBTI type, print the type in which each of the four letters is flipped to its opposite.
Level

Easy1 of 10

Topics
String, Implementation, Brute force
Solved
No attempts yet

Problem

Yeongil, who is about to graduate, feels lonelier as Christmas approaches.

For Yeongil's sake, Dongwoo does not set up a blind date, but instead helps Yeongil find an ideal match.

Yeongil, a firm believer in MBTI, is attracted to someone who is the exact opposite of himself. That is, someone whose four MBTI letters are all opposite to his own is Yeongil's ideal type.

MBTI describes personality along the following four scales. Each scale consists of two opposing traits.

TraitDescription
Extroversion (E)Introversion (I)Preferred world: the world and others / the inner world
Sensation (S)iNtuitionMode of perception: practical perception / perception beyond the real
Thinking (T)Feeling (F)Basis of judgment: facts and truth / relationships and people
Judging (J)Perceiving (P)Lifestyle: planned living / spontaneous living

Each of the four scales has two possibilities, so 16 types are formed in total. A type is written as four letters, one taken from the alphabet letter for each case. The following are the MBTI types.

GroupSensing/ThinkingSensing/FeelingIntuition/FeelingIntuition/Thinking
Introversion/JudgingISTJISFJINFJINTJ
Introversion/PerceivingISTPISFPINFPINTP
Extroversion/PerceivingESTPESFPENFPENTP
Extroversion/JudgingESTJESFJENFJENTJ

Help Yeongil find his ideal match without trouble!

Input

Yeongil's four-letter MBTI type is given in uppercase.

Output

Print the four-letter MBTI type of Yeongil's ideal match in uppercase.

Hint

MBTI is short for Myers-Briggs Type Indicator.

Examples2

  1. Example 1

    Input
    ESTJ
    
    Expected output
    INFP
    
  2. Example 2

    Input
    INFP
    
    Expected output
    ESTJ