This page is still under construction.

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

Compose a Hangul Syllable

Time limit1sMemory limit256 MB

Summary
Join the given choseong, jungseong, and optional jongseong into a single Hangul syllable and print it.
Level

Easy2 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

You are given one leading consonant (choseong), one vowel (jungseong), and one trailing consonant (jongseong). Write a program that joins the three jamo into a single Hangul syllable and prints it.

Input

The first line contains the choseong, the second line contains the jungseong, and the third line contains the jongseong. When the syllable has no jongseong, the third line is empty.

The choseong is one of ㄱ, ㄲ, ㄴ, ㄷ, ㄸ, ㄹ, ㅁ, ㅂ, ㅃ, ㅅ, ㅆ, ㅇ, ㅈ, ㅉ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ.

The jungseong is one of ㅏ, ㅐ, ㅑ, ㅒ, ㅓ, ㅔ, ㅕ, ㅖ, ㅗ, ㅘ, ㅙ, ㅚ, ㅛ, ㅜ, ㅝ, ㅞ, ㅟ, ㅠ, ㅡ, ㅢ, ㅣ.

The jongseong is one of ㄱ, ㄲ, ㄳ, ㄴ, ㄵ, ㄶ, ㄷ, ㄹ, ㄺ, ㄻ, ㄼ, ㄽ, ㄾ, ㄿ, ㅀ, ㅁ, ㅂ, ㅄ, ㅅ, ㅆ, ㅇ, ㅈ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ.

Output

Print, on the first line, the syllable formed from the given choseong, jungseong, and jongseong, encoded in UTF-8. The composed syllable always falls in the Unicode range U+AC00 to U+D7A3.

Examples4

  1. Example 1

    Input
    ㄱ
    ㅏ
    
    
    Expected output
    가
    
  2. Example 2

    Input
    ㄷ
    ㅏ
    ㄺ
    
    Expected output
    닭
    
  3. Example 3

    Input
    ㅂ
    ㅐ
    ㄱ
    
    Expected output
    백
    
  4. Example 4

    Input
    ㅈ
    ㅜ
    ㄴ
    
    Expected output
    준