%% -*- TeX -*-
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Modified by Songyong Sim to make index right
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This is `hfont.tex' written by zraun01@hpserv.zdv.uni-tuebingen.de.
%%
%% This file serves as font loading process for `hangul.sty' in
%% NFSS(New Font Selection Scheme) with LaTeX version 2e.
%%

%% LaTeX3 doesn't yet come out, but there is the official LaTeX version 2e.
%% This file can also be used with NFSS2, but it is out-of-date, so we
%% restrict us to use LaTeX2e for hangul document.

\NeedsTeXFormat{LaTeX2e}
\def\filedate{1994/11/30}
\def\fileversion{0.92}
\def\filename{hfont.tex}

\typeout{Hangul/Hanja Font Settings '\filename' <\filedate>}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Definitions for Hangul fonts %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\hangulencoding{\fontencoding{U}}

%% We introduce here new macro that can be used to get certain hangul
%% font shape work for default hangul font. The default is myoungjo(mj).

\newcount\hangulshape

\DeclareRobustCommand{\normalhangul}{\hanguldefault}

\def\mjdefault{\def\hanguldefault{\hangulshape=0}}
\def\gtdefault{\def\hanguldefault{\hangulshape=1}}
\def\gsdefault{\def\hanguldefault{\hangulshape=2}}
\def\grdefault{\def\hanguldefault{\hangulshape=3}}
\def\drdefault{\def\hanguldefault{\hangulshape=4}}
\def\gjdefault{\def\hanguldefault{\hangulshape=5}}
\def\pgdefault{\def\hanguldefault{\hangulshape=6}}
\mjdefault

\def\hangulfont{\hanguldefault}

\def\mj{\def\hangulfont{\hangulshape=0}}
\def\mjb{\mj\bf}
\def\gt{\def\hangulfont{\hangulshape=1}}
\def\gs{\def\hangulfont{\hangulshape=2}}
\def\gr{\def\hangulfont{\hangulshape=3}}
\def\dr{\def\hangulfont{\hangulshape=4}}
\def\gj{\def\hangulfont{\hangulshape=5}}
\def\pg{\def\hangulfont{\hangulshape=6}}
\def\ol{\def\hangulfont{\hangulshape=7}}

\DeclareRobustCommand{\hfA}{%
  \hangulfont\hangulencoding\fontfamily{hangul}\fontshape{%
  \ifcase\hangulshape mjA\or gtA\or gsA\or grA\or drA\or gjA\or%
  pgA\or olA\fi}\selectfont}
\DeclareRobustCommand{\hfB}{%
  \hangulfont\hangulencoding\fontfamily{hangul}\fontshape{%
  \ifcase\hangulshape mjB\or gtB\or gsB\or grB\or drB\or gjB\or%
  pgB\or olB\fi}\selectfont}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Definitions for Hangul symbol %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareRobustCommand{\sm}{%
  \hangulencoding\fontfamily{hangul}\fontshape{hsm}\selectfont}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Definitions for Hanja fonts %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcount\hanjashape

\def\hanjaencoding{\fontencoding{U}\fontfamily{hanja}}

\DeclareRobustCommand{\normalhanja}{\hanjadefault}

\def\hmjdefault{\def\hanjadefault{\hanjashape=0}}
\def\hgtdefault{\def\hanjadefault{\hanjashape=1}}
\hmjdefault

\def\hanjafont{\hanjadefault}

\def\hmj{\def\hanjafont{\hanjashape=0}}
\def\hgt{\def\hanjafont{\hanjashape=1}}

\DeclareRobustCommand{\hfC}{%
  \hanjaencoding\hanjafont\fontshape{hmjC}\selectfont}
\DeclareRobustCommand{\hfD}{%
  \hanjaencoding\hanjafont\fontshape{hmjD}\selectfont}
\DeclareRobustCommand{\hfE}{%
  \hanjaencoding\hanjafont\fontshape{hmjE}\selectfont}
\DeclareRobustCommand{\hfF}{%
  \hanjaencoding\hanjafont\fontshape{hmjF}\selectfont}
\DeclareRobustCommand{\hfG}{%
  \hanjaencoding\hanjafont\fontshape{hmjG}\selectfont}
\DeclareRobustCommand{\hfH}{%
  \hanjaencoding\hanjafont\fontshape{hmjH}\selectfont}
\DeclareRobustCommand{\hfI}{%
  \hanjaencoding\hanjafont\fontshape{hmjI}\selectfont}
\DeclareRobustCommand{\hfJ}{%
  \hanjaencoding\hanjafont\fontshape{hmjJ}\selectfont}
\DeclareRobustCommand{\hfK}{%
  \hanjaencoding\hanjafont\fontshape{hmjK}\selectfont}
\DeclareRobustCommand{\hfL}{%
  \hanjaencoding\hanjafont\fontshape{hmjL}\selectfont}
\DeclareRobustCommand{\hfM}{%
  \hanjaencoding\hanjafont\fontshape{hmjM}\selectfont}
\DeclareRobustCommand{\hfN}{%
  \hanjaencoding\hanjafont\fontshape{hmjN}\selectfont}
\DeclareRobustCommand{\hfO}{%
  \hanjaencoding\hanjafont\fontshape{hmjO}\selectfont}
\DeclareRobustCommand{\hfP}{%
  \hanjaencoding\hanjafont\fontshape{hmjP}\selectfont}
\DeclareRobustCommand{\hfQ}{%
  \hanjaencoding\hanjafont\fontshape{hmjQ}\selectfont}
\DeclareRobustCommand{\hfR}{%
  \hanjaencoding\hanjafont\fontshape{hmjR}\selectfont}
\DeclareRobustCommand{\hfS}{%
  \hanjaencoding\hanjafont\fontshape{hmjS}\selectfont}
\DeclareRobustCommand{\hfT}{%
  \hanjaencoding\hanjafont\fontshape{hmjT}\selectfont}
\DeclareRobustCommand{\hfU}{%
  \hanjaencoding\hanjafont\fontshape{hmjU}\selectfont}
\DeclareRobustCommand{\hfV}{%
  \hanjaencoding\hanjafont\fontshape{hmjV}\selectfont}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Hangul, Hanja font macros %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% We defined the bold face fonts for Hangul and Hanja in the font
% definition files as bold extended(bx), so we define \bfdefault as
% bx, that we can avoid any possible font loading errors.

\def\bfdefault{bx}

\def\hC{\char}

%% \hP = \penalty5�� �� ���� ���� �����Ŵ���μ� �ѱ۹����� format��
%% �˸°� ���ִ� �ݸ鿡 �� ���� ��ħǥ(.?!) ��ǥ(,:) ����ǥ("`')
%% ����ǥ((){}[]) ���� ����� �����ϰ�, �������� ó������
%% �Ѿ�ų�(.?!"')}]) ������ �������� ���� �ִ�("`({[) ��찡 ����
%% �ְԵ˴ϴ�. �׷��Ƿ� �츮�� \penalty�� ���� �ʰ� ��ſ�
%% \emergencystretch�� ����Ͽ�, overfull \hbox�� �߻��� ��� ���ڻ�����
%% ������ �������μ�, ������ \linebreak�� �����ϰ� �մϴ�.
%%
%% �ѱ� �� ���ڴ� hyphenation�� �����ϴ�. �׷��� �ܾ��� �߰��� ����
%% ���������� �ʾ� overfull \hbox�� ���� �߻��Ͽ����ϴ�.
%% \emergencystretch�� ��� ���� ������ \linebreak�� �����ϰ� �Ǿ�����
%% ���������� �ʾ����ϴ�. �׷��� �츮�� �ϼ��� ������ ������
%% \discretionary{}{}{}�� \hyphenchar�� ���� hyphenation�� �����ϰ�
%% �մϴ�. �̷μ� ��� ���� \sfcode�� ����� ��ȣ�� �� �ְ� �Ǿ����ϴ�.

\def\H@hyphen{\discretionary{}{}{}}

%\emergencystretch=20pt

%% 0.92 scheme

\newcount\Catch \Catch=161 %
\loop \chardef\Catchar=\Catch%
\catcode\Catchar=\active \advance\Catch by 1%
\ifnum\Catch<254\repeat

\newcount\h@N\newcount\h@@N\newcount\h@@@N
\newcount\KSCode

% Hangul (�ѱ�)

%% INITEX sets up \mathcode x=x, for x=0..255, except that
%% \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
%% \mathcode x=x+"7000, for x = `0 to `9.

\newcount\a@y\newcount\a@@y
%\def\H@G#1{\def#1##1{\Han@Gul{\the\mathcode`#1}{\the\mathcode`##1}}}
\def\H@G#1{\def#1##1{\HanGulEnCoding{\the\mathcode`#1}{\the\mathcode`##1}}}

\H@G^^b0 \H@G^^b1 \H@G^^b2 \H@G^^b3 \H@G^^b4 \H@G^^b5 \H@G^^b6 \H@G^^b7
\H@G^^b8 \H@G^^b9 \H@G^^ba \H@G^^bb \H@G^^bc \H@G^^bd \H@G^^be \H@G^^bf
\H@G^^c0 \H@G^^c1 \H@G^^c2 \H@G^^c3 \H@G^^c4 \H@G^^c5 \H@G^^c6 \H@G^^c7
\H@G^^c8

%\DeclareRobustCommand{\Han@Gul}[2]{\a@y=#1%
\DeclareRobustCommand{\HanGulEnCoding}[2]{\a@y=#1%
\advance\a@y by-176%
\a@@y=#2%
{\csname HanGul\ifcase\a@y A\or B\or C\or D\or E\or F\or G\or%
H\or I\or J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or%
V\or W\or X\or Y\fi\endcsname\a@@y\H@hyphen}}

\DeclareRobustCommand{\HanGulA}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC14\hC34\or\hfB\hC14\hC34\hC184\or\hfB\hC14\hC37\hC187%
\or\hfB\hC14\hC34\hC190\or\hfB\hC14\hC34\hC191\or\hfB\hC14\hC34\hC192%
\or\hfB\hC14\hC34\hC193\or\hfB\hC14\hC34\hC196\or\hfB\hC14\hC34\hC197%
\or\hfB\hC14\hC34\hC198\or\hfB\hC14\hC37\hC199\or\hfB\hC14\hC34\hC200%
\or\hfB\hC14\hC34\hC201\or\hfB\hC14\hC34\hC202\or\hfB\hC14\hC34\hC203%
\or\hfB\hC14\hC34\hC205\or\hfB\hC14\hC34\hC206\or\hfB\hC14\hC34\hC207%
\or\hfA\hC50\hC64\or\hfB\hC61\hC75\hC184\or\hfB\hC61\hC77\hC187%
\or\hfB\hC61\hC75\hC191\or\hfB\hC61\hC75\hC196\or\hfB\hC61\hC75\hC197%
\or\hfB\hC61\hC77\hC199\or\hfB\hC61\hC75\hC200\or\hfB\hC61\hC75\hC201%
\or\hfA\hC14\hC35\or\hfB\hC14\hC35\hC184\or\hfB\hC14\hC38\hC187%
\or\hfB\hC14\hC35\hC191\or\hfB\hC14\hC38\hC199\or\hfB\hC14\hC35\hC201%
\or\hfA\hC50\hC65\or\hfB\hC61\hC78\hC187\or\hfB\hC61\hC76\hC191%
\or\hfA\hC14\hC41\or\hfB\hC14\hC44\hC184\or\hfB\hC14\hC46\hC187%
\or\hfB\hC14\hC44\hC190\or\hfB\hC14\hC44\hC191\or\hfB\hC14\hC44\hC193%
\or\hfB\hC14\hC44\hC196\or\hfB\hC14\hC44\hC197\or\hfB\hC14\hC46\hC199%
\or\hfB\hC14\hC44\hC200\or\hfB\hC14\hC44\hC201\or\hfB\hC14\hC44\hC202%
\or\hfB\hC14\hC44\hC205\or\hfB\hC14\hC44\hC206\or\hfB\hC14\hC44\hC207%
\or\hfA\hC50\hC76\or\hfB\hC61\hC92\hC187\or\hfB\hC61\hC90\hC191%
\or\hfB\hC61\hC90\hC196\or\hfB\hC61\hC90\hC197\or\hfB\hC61\hC92\hC199%
\or\hfB\hC61\hC90\hC200\or\hfB\hC61\hC90\hC201\or\hfA\hC14\hC42%
\or\hfB\hC14\hC45\hC184\or\hfB\hC14\hC45\hC185\or\hfB\hC14\hC47\hC187%
\or\hfB\hC14\hC45\hC190\or\hfB\hC14\hC45\hC191\or\hfB\hC14\hC45\hC196%
\or\hfB\hC14\hC45\hC197\or\hfB\hC14\hC47\hC199\or\hfB\hC14\hC45\hC200%
\or\hfB\hC14\hC45\hC201\or\hfB\hC14\hC45\hC205\or\hfA\hC50\hC77%
\or\hfB\hC61\hC93\hC187\or\hfB\hC61\hC91\hC191\or\hfB\hC61\hC91\hC197%
\or\hfB\hC61\hC93\hC199\or\hfA\hC85\hC87\or\hfA\hC188\hC190\hC228%
\or\hfA\hC188\hC190\hC231\or\hfA\hC188\hC190\hC233\or\hfA\hC188\hC190\hC234%
\or\hfA\hC188\hC190\hC236\or\hfA\hC188\hC190\hC237\or\hfA\hC188\hC190\hC238%
\or\hfA\hC188\hC190\hC239\or\hfA\hC188\hC190\hC240\or\hfA\hC188\hC190\hC241%
\or\hfA\hC188\hC190\hC242\or\hfA\hC188\hC190\hC243\or\hfA\hC140\hC158%
\or\hfB\hC106\hC124\hC208\or\hfB\hC106\hC126\hC209\or\hfB\hC106\hC124\hC212%
\or\hfB\hC128\fi}}

\DeclareRobustCommand{\HanGulB}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC106\hC124\hC216\or\hfB\hC106\hC124\hC217%
\or\hfB\hC106\hC126\hC218\or\hfB\hC106\hC124\hC220\or\hfB\hC223%
\or\hfB\hC159\hC166\hC209\or\hfB\hC159\hC165\hC212\or\hfB\hC159\hC165\hC217%
\or\hfB\hC159\hC165\hC219\or\hfB\hC159\hC165\hC220\or\hfA\hC140\hC36%
\or\hfB\hC106\hC125\hC208\or\hfB\hC106\hC127\hC209\or\hfB\hC106\hC125\hC212%
\or\hfB\hC106\hC125\hC216\or\hfB\hC106\hC125\hC217\or\hfB\hC106\hC127\hC218%
\or\hfB\hC106\hC125\hC220\or\hfA\hC85\hC88\or\hfA\hC188\hC191\hC231%
\or\hfA\hC188\hC191\hC234\or\hfA\hC188\hC191\hC240\or\hfA\hC188\hC191\hC241%
\or\hfA\hC115\hC118\or\hfA\hC188\hC194\hC228\or\hfA\hC188\hC196%
\or\hfA\hC188\hC194\hC233\or\hfA\hC188\hC194\hC234\or\hfA\hC188\hC194\hC235%
\or\hfA\hC188\hC194\hC236\or\hfA\hC188\hC194\hC238\or\hfA\hC188\hC194\hC239%
\or\hfA\hC188\hC194\hC240\or\hfA\hC188\hC194\hC241\or\hfA\hC188\hC194\hC242%
\or\hfA\hC188\hC194\hC243\or\hfA\hC168\hC175\or\hfB\hC135\hC138\hC208%
\or\hfB\hC135\hC139\hC209\or\hfB\hC135\hC138\hC212\or\hfB\hC135\hC138\hC219%
\or\hfB\hC135\hC138\hC220\or\hfB\hC236\or\hfB\hC180%
\or\hfA\hC168\hC36\or\hfB\hC135\hC125\hC208\or\hfB\hC135\hC127\hC209%
\or\hfB\hC135\hC125\hC212\or\hfB\hC135\hC125\hC216\or\hfB\hC135\hC125\hC217%
\or\hfB\hC135\hC127\hC218\or\hfA\hC115\hC119\or\hfA\hC188\hC197%
\or\hfA\hC188\hC195\hC234\or\hfA\hC85\hC91\or\hfA\hC188\hC198\hC228%
\or\hfA\hC188\hC198\hC231\or\hfA\hC188\hC198\hC233\or\hfA\hC188\hC198\hC234%
\or\hfA\hC188\hC198\hC235\or\hfA\hC188\hC198\hC239\or\hfA\hC188\hC198\hC240%
\or\hfA\hC188\hC198\hC241\or\hfA\hC188\hC198\hC242\or\hfA\hC160%
\or\hfA\hC14\hC36\or\hfB\hC14\hC36\hC184\or\hfB\hC14\hC39\hC187%
\or\hfB\hC14\hC36\hC190\or\hfB\hC14\hC36\hC191\or\hfB\hC14\hC36\hC193%
\or\hfB\hC14\hC36\hC196\or\hfB\hC14\hC36\hC197\or\hfB\hC14\hC39\hC199%
\or\hfB\hC14\hC36\hC201\or\hfB\hC14\hC36\hC202\or\hfB\hC14\hC36\hC206%
\or\hfA\hC15\hC34\or\hfB\hC15\hC34\hC184\or\hfB\hC15\hC34\hC185%
\or\hfB\hC15\hC37\hC187\or\hfB\hC15\hC34\hC191\or\hfB\hC15\hC34\hC193%
\or\hfB\hC15\hC34\hC196\or\hfB\hC15\hC34\hC197\or\hfB\hC15\hC37\hC199%
\or\hfB\hC15\hC34\hC200\or\hfB\hC15\hC34\hC201\or\hfB\hC15\hC34\hC205%
\or\hfA\hC66\hC71\or\hfB\hC79\hC84\hC184\or\hfB\hC79\hC85\hC187%
\or\hfB\hC79\hC84\hC191\or\hfB\hC79\hC84\hC196\fi}}

\DeclareRobustCommand{\HanGulC}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC79\hC84\hC197%
\or\hfB\hC79\hC85\hC199\or\hfB\hC79\hC84\hC200\or\hfB\hC79\hC84\hC201%
\or\hfA\hC15\hC35\or\hfB\hC15\hC35\hC184\or\hfB\hC15\hC35\hC191%
\or\hfA\hC15\hC44\or\hfB\hC15\hC49\hC184\or\hfB\hC15\hC49\hC185%
\or\hfB\hC15\hC51\hC187\or\hfB\hC15\hC49\hC191\or\hfB\hC15\hC49\hC196%
\or\hfB\hC15\hC49\hC197\or\hfB\hC15\hC51\hC199\or\hfB\hC15\hC49\hC200%
\or\hfB\hC15\hC49\hC201\or\hfA\hC66\hC79\or\hfB\hC79\hC95\hC184%
\or\hfB\hC79\hC96\hC187\or\hfB\hC79\hC95\hC196\or\hfB\hC79\hC96\hC199%
\or\hfB\hC79\hC95\hC201\or\hfA\hC15\hC45\or\hfB\hC15\hC52\hC187%
\or\hfB\hC15\hC50\hC191\or\hfB\hC15\hC52\hC199\or\hfB\hC15\hC50\hC200%
\or\hfB\hC15\hC50\hC205\or\hfA\hC66\hC80\or\hfA\hC89\hC102%
\or\hfA\hC192\hC212\hC228\or\hfA\hC192\hC212\hC231\or\hfA\hC192\hC212\hC232%
\or\hfA\hC192\hC212\hC234\or\hfA\hC192\hC212\hC239\or\hfA\hC192\hC212\hC240%
\or\hfA\hC192\hC212\hC241\or\hfA\hC192\hC212\hC242\or\hfA\hC192\hC212\hC243%
\or\hfA\hC192\hC212\hC244\or\hfA\hC141\hC158\or\hfB\hC107\hC124\hC208%
\or\hfB\hC107\hC124\hC212\or\hfB\hC107\hC124\hC219\or\hfB\hC107\hC124\hC220%
\or\hfB\hC224\or\hfB\hC160\hC165\hC208\or\hfB\hC160\hC165\hC220%
\or\hfA\hC141\hC36\or\hfB\hC107\hC127\hC209\or\hfB\hC107\hC125\hC212%
\or\hfB\hC107\hC125\hC216\or\hfB\hC107\hC125\hC217\or\hfB\hC107\hC125\hC220%
\or\hfA\hC89\hC103\or\hfA\hC116\hC118\or\hfA\hC192\hC214\hC228%
\or\hfA\hC192\hC216\or\hfA\hC192\hC214\hC234\or\hfA\hC192\hC214\hC238%
\or\hfA\hC192\hC214\hC239\or\hfA\hC192\hC214\hC240\or\hfA\hC192\hC214\hC241%
\or\hfA\hC192\hC214\hC242\or\hfA\hC192\hC214\hC243\or\hfA\hC169\hC175%
\or\hfB\hC136\hC138\hC212\or\hfB\hC136\hC138\hC219\or\hfB\hC136\hC138\hC220%
\or\hfB\hC237\or\hfB\hC173\hC176\hC208\or\hfB\hC173\hC177\hC209%
\or\hfB\hC173\hC176\hC212\or\hfB\hC173\hC176\hC216\or\hfB\hC173\hC176\hC217%
\or\hfB\hC173\hC176\hC219\or\hfA\hC169\hC36\or\hfB\hC136\hC127\hC209%
\or\hfB\hC136\hC125\hC212\or\hfB\hC136\hC125\hC216\or\hfB\hC136\hC125\hC217%
\or\hfA\hC116\hC119\or\hfA\hC89\hC91\or\hfA\hC192\hC198\hC228%
\or\hfA\hC192\hC198\hC231\or\hfA\hC192\hC198\hC232\or\hfA\hC192\hC198\hC234%
\or\hfA\hC192\hC198\hC236\or\hfA\hC192\hC198\hC238\or\hfA\hC192\hC198\hC239%
\or\hfA\hC192\hC198\hC240\or\hfA\hC192\hC198\hC241\or\hfA\hC192\hC198\hC242%
\fi}}

\DeclareRobustCommand{\HanGulD}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC192\hC198\hC246\or\hfA\hC15\hC36\or\hfB\hC15\hC36\hC184%
\or\hfB\hC15\hC39\hC187\or\hfB\hC15\hC36\hC191\or\hfB\hC15\hC36\hC196%
\or\hfB\hC15\hC36\hC197\or\hfB\hC15\hC39\hC199\or\hfB\hC15\hC36\hC201%
\or\hfA\hC16\hC34\or\hfB\hC16\hC34\hC184\or\hfB\hC16\hC34\hC185%
\or\hfB\hC16\hC37\hC187\or\hfB\hC16\hC34\hC190\or\hfB\hC16\hC34\hC191%
\or\hfB\hC16\hC34\hC192\or\hfB\hC16\hC34\hC193\or\hfB\hC16\hC34\hC196%
\or\hfB\hC16\hC34\hC197\or\hfB\hC16\hC37\hC199\or\hfB\hC16\hC34\hC200%
\or\hfB\hC16\hC34\hC201\or\hfB\hC16\hC34\hC202\or\hfB\hC16\hC34\hC203%
\or\hfB\hC16\hC34\hC205\or\hfB\hC16\hC34\hC207\or\hfA\hC51\hC64%
\or\hfB\hC62\hC75\hC184\or\hfB\hC62\hC77\hC187\or\hfB\hC62\hC75\hC191%
\or\hfB\hC62\hC75\hC196\or\hfB\hC62\hC75\hC197\or\hfB\hC62\hC77\hC199%
\or\hfB\hC62\hC75\hC200\or\hfB\hC62\hC75\hC201\or\hfA\hC16\hC35%
\or\hfB\hC16\hC35\hC184\or\hfB\hC16\hC38\hC187\or\hfB\hC16\hC35\hC191%
\or\hfB\hC16\hC35\hC196\or\hfB\hC16\hC35\hC201\or\hfA\hC48%
\or\hfB\hC57\hC184\or\hfB\hC57\hC186\or\hfB\hC59\hC187%
\or\hfB\hC57\hC191\or\hfB\hC57\hC193\or\hfB\hC57\hC194%
\or\hfB\hC57\hC196\or\hfB\hC57\hC197\or\hfB\hC59\hC199%
\or\hfB\hC57\hC200\or\hfB\hC57\hC201\or\hfB\hC57\hC207%
\or\hfA\hC83\or\hfB\hC102\hC184\or\hfB\hC103%
\or\hfB\hC102\hC191\or\hfB\hC102\hC196\or\hfB\hC102\hC197%
\or\hfB\hC105\or\hfB\hC102\hC200\or\hfB\hC102\hC201%
\or\hfA\hC49\or\hfB\hC58\hC184\or\hfB\hC60\hC187%
\or\hfB\hC58\hC191\or\hfB\hC58\hC196\or\hfB\hC58\hC197%
\or\hfB\hC58\hC200\or\hfB\hC58\hC201\or\hfB\hC58\hC204%
\or\hfA\hC84\or\hfB\hC104\or\hfA\hC90\hC102%
\or\hfA\hC193\hC212\hC228\or\hfA\hC193\hC212\hC231\or\hfA\hC193\hC212\hC234%
\or\hfA\hC193\hC212\hC236\or\hfA\hC193\hC212\hC239\or\hfA\hC193\hC212\hC240%
\or\hfA\hC193\hC212\hC241\or\hfA\hC193\hC212\hC242\or\hfA\hC193\hC212\hC247%
\or\hfA\hC193\hC212\hC248\or\hfA\hC142\hC158\or\hfB\hC108\hC126\hC209%
\or\hfB\hC108\hC124\hC212\or\hfB\hC108\hC124\hC219\or\hfA\hC142\hC36%
\or\hfB\hC108\hC127\hC209\or\hfB\hC108\hC125\hC212\or\hfB\hC108\hC125\hC216%
\or\hfB\hC108\hC125\hC217\fi}}

\DeclareRobustCommand{\HanGulE}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC108\hC127\hC218\or\hfA\hC90\hC103%
\or\hfA\hC193\hC213\hC228\or\hfA\hC193\hC213\hC231\or\hfA\hC193\hC213\hC234%
\or\hfA\hC193\hC213\hC240\or\hfA\hC193\hC213\hC241\or\hfA\hC193\hC213\hC242%
\or\hfA\hC117\hC118\or\hfA\hC193\hC214\hC228\or\hfA\hC193\hC216%
\or\hfA\hC193\hC214\hC233\or\hfA\hC193\hC214\hC234\or\hfA\hC193\hC214\hC239%
\or\hfA\hC193\hC214\hC240\or\hfA\hC193\hC214\hC241\or\hfA\hC193\hC214\hC242%
\or\hfA\hC170\hC175\or\hfB\hC137\hC138\hC219\or\hfB\hC238%
\or\hfA\hC170\hC36\or\hfB\hC137\hC127\hC209\or\hfB\hC137\hC125\hC212%
\or\hfB\hC137\hC125\hC216\or\hfB\hC137\hC125\hC217\or\hfA\hC117\hC119%
\or\hfA\hC193\hC215\hC228\or\hfA\hC193\hC215\hC234\or\hfA\hC193\hC215\hC239%
\or\hfA\hC193\hC215\hC240\or\hfA\hC193\hC215\hC242\or\hfA\hC90\hC91%
\or\hfA\hC193\hC198\hC228\or\hfA\hC193\hC198\hC231\or\hfA\hC193\hC198\hC234%
\or\hfA\hC193\hC198\hC235\or\hfA\hC193\hC198\hC236\or\hfA\hC193\hC198\hC239%
\or\hfA\hC193\hC198\hC240\or\hfA\hC193\hC198\hC241\or\hfA\hC193\hC198\hC242%
\or\hfA\hC193\hC198\hC243\or\hfA\hC193\hC198\hC247\or\hfA\hC161%
\or\hfB\hC129\hC127\hC209\or\hfB\hC129\hC125\hC212\or\hfA\hC16\hC36%
\or\hfB\hC16\hC36\hC184\or\hfB\hC16\hC39\hC187\or\hfB\hC16\hC36\hC191%
\or\hfB\hC16\hC36\hC193\or\hfB\hC16\hC36\hC196\or\hfB\hC16\hC36\hC197%
\or\hfB\hC16\hC39\hC199\or\hfB\hC16\hC36\hC201\or\hfB\hC16\hC36\hC206%
\or\hfA\hC17\hC34\or\hfB\hC17\hC34\hC184\or\hfB\hC17\hC34\hC185%
\or\hfB\hC17\hC37\hC187\or\hfB\hC17\hC34\hC190\or\hfB\hC17\hC34\hC191%
\or\hfB\hC17\hC34\hC192\or\hfB\hC17\hC34\hC193\or\hfB\hC17\hC34\hC194%
\or\hfB\hC17\hC34\hC195\or\hfB\hC17\hC34\hC196\or\hfB\hC17\hC34\hC197%
\or\hfB\hC17\hC37\hC199\or\hfB\hC17\hC34\hC200\or\hfB\hC17\hC34\hC201%
\or\hfB\hC17\hC34\hC202\or\hfB\hC17\hC34\hC203\or\hfB\hC17\hC34\hC207%
\or\hfA\hC52\hC64\or\hfB\hC63\hC75\hC184\or\hfB\hC63\hC77\hC187%
\or\hfB\hC63\hC75\hC191\or\hfB\hC63\hC75\hC196\or\hfB\hC63\hC75\hC197%
\or\hfB\hC63\hC77\hC199\or\hfB\hC63\hC75\hC200\or\hfB\hC63\hC75\hC201%
\or\hfA\hC17\hC35\or\hfA\hC37\hC41\or\hfB\hC40\hC44\hC184%
\or\hfB\hC40\hC44\hC185\or\hfB\hC40\hC46\hC187\or\hfB\hC40\hC44\hC190%
\or\hfB\hC40\hC44\hC191\or\hfB\hC40\hC44\hC193\or\hfB\hC40\hC44\hC194%
\or\hfB\hC40\hC44\hC196\or\hfB\hC40\hC44\hC197\fi}}

\DeclareRobustCommand{\HanGulF}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC40\hC46\hC199%
\or\hfB\hC40\hC44\hC201\or\hfB\hC40\hC44\hC203\or\hfB\hC40\hC44\hC206%
\or\hfA\hC72\hC76\or\hfB\hC86\hC90\hC184\or\hfB\hC86\hC92\hC187%
\or\hfB\hC86\hC90\hC191\or\hfB\hC86\hC90\hC196\or\hfB\hC86\hC90\hC197%
\or\hfB\hC86\hC92\hC199\or\hfB\hC86\hC90\hC200\or\hfB\hC86\hC90\hC201%
\or\hfA\hC37\hC42\or\hfB\hC40\hC47\hC187\or\hfB\hC40\hC45\hC191%
\or\hfB\hC40\hC45\hC200\or\hfB\hC40\hC45\hC201\or\hfA\hC72\hC77%
\or\hfB\hC86\hC93\hC187\or\hfA\hC92\hC102\or\hfA\hC199\hC212\hC228%
\or\hfA\hC199\hC212\hC231\or\hfA\hC199\hC212\hC233\or\hfA\hC199\hC212\hC234%
\or\hfA\hC199\hC212\hC236\or\hfA\hC199\hC212\hC237\or\hfA\hC199\hC212\hC239%
\or\hfA\hC199\hC212\hC240\or\hfA\hC199\hC212\hC241\or\hfA\hC199\hC212\hC242%
\or\hfA\hC199\hC212\hC244\or\hfA\hC199\hC212\hC246\or\hfA\hC143\hC158%
\or\hfB\hC109\hC126\hC209\or\hfB\hC109\hC124\hC212\or\hfB\hC225%
\or\hfB\hC167\or\hfA\hC143\hC36\or\hfB\hC109\hC127\hC209%
\or\hfB\hC109\hC125\hC212\or\hfB\hC109\hC125\hC216\or\hfB\hC109\hC125\hC217%
\or\hfB\hC109\hC127\hC218\or\hfA\hC92\hC103\or\hfA\hC120\hC127%
\or\hfA\hC199\hC214\hC228\or\hfA\hC199\hC216\or\hfA\hC199\hC214\hC234%
\or\hfA\hC199\hC214\hC239\or\hfA\hC199\hC214\hC240\or\hfA\hC199\hC214\hC241%
\or\hfA\hC199\hC214\hC242\or\hfA\hC171\hC175\or\hfB\hC140\hC150\hC219%
\or\hfB\hC239\or\hfB\hC181\or\hfA\hC171\hC36%
\or\hfB\hC140\hC127\hC209\or\hfB\hC140\hC125\hC212\or\hfB\hC140\hC125\hC217%
\or\hfB\hC140\hC127\hC218\or\hfB\hC140\hC125\hC220\or\hfA\hC120\hC128%
\or\hfA\hC199\hC217\or\hfA\hC199\hC215\hC234\or\hfA\hC199\hC215\hC239%
\or\hfA\hC199\hC215\hC242\or\hfA\hC92\hC104\or\hfA\hC199\hC218\hC228%
\or\hfA\hC199\hC218\hC231\or\hfA\hC199\hC218\hC233\or\hfA\hC199\hC218\hC234%
\or\hfA\hC199\hC218\hC236\or\hfA\hC199\hC218\hC239\or\hfA\hC199\hC218\hC240%
\or\hfA\hC199\hC218\hC241\or\hfA\hC199\hC218\hC242\or\hfA\hC162%
\or\hfA\hC17\hC36\or\hfB\hC17\hC36\hC184\or\hfB\hC17\hC39\hC187%
\or\hfB\hC17\hC36\hC190\or\hfB\hC17\hC36\hC191\or\hfB\hC17\hC36\hC196%
\or\hfB\hC17\hC36\hC197\or\hfB\hC17\hC39\hC199\or\hfB\hC17\hC36\hC200%
\or\hfB\hC17\hC36\hC201\or\hfB\hC17\hC36\hC202\or\hfA\hC18\hC34%
\or\hfB\hC18\hC34\hC184\or\hfB\hC18\hC37\hC187\or\hfB\hC18\hC34\hC191%
\fi}}

\DeclareRobustCommand{\HanGulG}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC18\hC34\hC196\or\hfB\hC18\hC34\hC197\or\hfB\hC18\hC37\hC199%
\or\hfB\hC18\hC34\hC200\or\hfB\hC18\hC34\hC201\or\hfB\hC18\hC34\hC207%
\or\hfA\hC67\hC71\or\hfB\hC80\hC84\hC184\or\hfB\hC80\hC85\hC187%
\or\hfB\hC80\hC84\hC191\or\hfB\hC80\hC84\hC196\or\hfB\hC80\hC84\hC197%
\or\hfB\hC80\hC85\hC199\or\hfB\hC80\hC84\hC200\or\hfB\hC80\hC84\hC201%
\or\hfA\hC43\hC44\or\hfB\hC48\hC49\hC184\or\hfB\hC48\hC51\hC187%
\or\hfB\hC48\hC49\hC191\or\hfB\hC48\hC49\hC193\or\hfB\hC48\hC49\hC194%
\or\hfB\hC48\hC49\hC196\or\hfB\hC48\hC49\hC197\or\hfB\hC48\hC51\hC199%
\or\hfB\hC48\hC49\hC200\or\hfB\hC48\hC49\hC201\or\hfB\hC48\hC49\hC207%
\or\hfA\hC78\hC79\or\hfB\hC94\hC95\hC184\or\hfB\hC94\hC96\hC187%
\or\hfB\hC94\hC95\hC191\or\hfB\hC94\hC95\hC196\or\hfB\hC94\hC95\hC197%
\or\hfB\hC94\hC96\hC199\or\hfB\hC94\hC95\hC200\or\hfB\hC94\hC95\hC201%
\or\hfA\hC43\hC45\or\hfB\hC48\hC50\hC200\or\hfA\hC93\hC102%
\or\hfA\hC200\hC212\hC228\or\hfA\hC200\hC212\hC231\or\hfA\hC200\hC212\hC234%
\or\hfA\hC200\hC212\hC242\or\hfA\hC144\hC158\or\hfB\hC110\hC124\hC212%
\or\hfB\hC226\or\hfA\hC144\hC36\or\hfB\hC110\hC127\hC209%
\or\hfA\hC121\hC127\or\hfA\hC200\hC214\hC228\or\hfA\hC200\hC216%
\or\hfA\hC200\hC214\hC234\or\hfA\hC200\hC214\hC238\or\hfA\hC200\hC214\hC239%
\or\hfA\hC200\hC214\hC242\or\hfB\hC240\or\hfA\hC172\hC36%
\or\hfB\hC141\hC127\hC209\or\hfB\hC141\hC125\hC212\or\hfB\hC141\hC125\hC216%
\or\hfB\hC141\hC125\hC217\or\hfB\hC141\hC125\hC220\or\hfA\hC93\hC104%
\or\hfA\hC200\hC218\hC228\or\hfA\hC200\hC218\hC231\or\hfA\hC200\hC218\hC233%
\or\hfA\hC200\hC218\hC234\or\hfA\hC200\hC218\hC239\or\hfA\hC200\hC218\hC240%
\or\hfA\hC200\hC218\hC241\or\hfA\hC163\or\hfB\hC130\hC127\hC209%
\or\hfB\hC130\hC125\hC212\or\hfB\hC130\hC125\hC216\or\hfB\hC130\hC125\hC217%
\or\hfA\hC18\hC36\or\hfB\hC18\hC39\hC187\or\hfB\hC18\hC36\hC191%
\or\hfB\hC18\hC36\hC196\or\hfB\hC18\hC36\hC197\or\hfB\hC18\hC39\hC199%
\or\hfB\hC18\hC36\hC201\or\hfA\hC19\hC34\or\hfB\hC19\hC34\hC184%
\or\hfB\hC19\hC37\hC187\or\hfB\hC19\hC34\hC191\or\hfB\hC19\hC34\hC196%
\or\hfB\hC19\hC34\hC197\or\hfB\hC19\hC37\hC199\or\hfB\hC19\hC34\hC200%
\or\hfB\hC19\hC34\hC201\or\hfB\hC19\hC34\hC202\or\hfB\hC19\hC34\hC206%
\or\hfB\hC19\hC34\hC207\fi}}

\DeclareRobustCommand{\HanGulH}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC53\hC64\or\hfB\hC64\hC75\hC184%
\or\hfB\hC64\hC77\hC187\or\hfB\hC64\hC75\hC191\or\hfB\hC64\hC75\hC196%
\or\hfB\hC64\hC75\hC197\or\hfB\hC64\hC77\hC199\or\hfB\hC64\hC75\hC200%
\or\hfB\hC64\hC75\hC201\or\hfA\hC19\hC35\or\hfB\hC19\hC35\hC184%
\or\hfB\hC19\hC38\hC187\or\hfB\hC19\hC38\hC199\or\hfB\hC19\hC35\hC201%
\or\hfA\hC38\hC41\or\hfB\hC41\hC44\hC184\or\hfB\hC41\hC46\hC187%
\or\hfB\hC41\hC44\hC191\or\hfB\hC41\hC44\hC196\or\hfB\hC41\hC44\hC197%
\or\hfB\hC41\hC46\hC199\or\hfB\hC41\hC44\hC200\or\hfB\hC41\hC44\hC201%
\or\hfB\hC41\hC44\hC207\or\hfA\hC73\hC76\or\hfB\hC87\hC90\hC184%
\or\hfB\hC87\hC92\hC187\or\hfB\hC87\hC90\hC191\or\hfB\hC87\hC90\hC196%
\or\hfB\hC87\hC90\hC197\or\hfB\hC87\hC92\hC199\or\hfB\hC87\hC92\hC201%
\or\hfA\hC38\hC42\or\hfB\hC41\hC45\hC184\or\hfB\hC41\hC47\hC187%
\or\hfB\hC41\hC45\hC191\or\hfB\hC41\hC45\hC196\or\hfB\hC41\hC45\hC197%
\or\hfB\hC41\hC47\hC199\or\hfB\hC41\hC45\hC200\or\hfB\hC41\hC45\hC201%
\or\hfA\hC73\hC77\or\hfB\hC87\hC93\hC187\or\hfB\hC87\hC91\hC197%
\or\hfB\hC87\hC93\hC199\or\hfA\hC105\hC109\or\hfA\hC201\hC212\hC228%
\or\hfA\hC201\hC212\hC231\or\hfA\hC201\hC212\hC234\or\hfA\hC201\hC212\hC239%
\or\hfA\hC201\hC212\hC240\or\hfA\hC201\hC212\hC241\or\hfA\hC201\hC212\hC242%
\or\hfA\hC145\hC158\or\hfB\hC111\hC126\hC209\or\hfB\hC111\hC124\hC220%
\or\hfB\hC168\or\hfA\hC145\hC36\or\hfB\hC111\hC127\hC209%
\or\hfB\hC111\hC125\hC212\or\hfB\hC111\hC125\hC216\or\hfB\hC111\hC125\hC217%
\or\hfB\hC111\hC127\hC218\or\hfB\hC111\hC125\hC220\or\hfA\hC105\hC110%
\or\hfA\hC201\hC213\hC231\or\hfA\hC201\hC213\hC234\or\hfA\hC201\hC213\hC240%
\or\hfA\hC201\hC213\hC241\or\hfA\hC201\hC213\hC242\or\hfA\hC129\hC136%
\or\hfA\hC201\hC214\hC228\or\hfA\hC201\hC216\or\hfA\hC201\hC214\hC234%
\or\hfA\hC201\hC214\hC239\or\hfA\hC201\hC214\hC240\or\hfA\hC201\hC214\hC241%
\or\hfA\hC201\hC214\hC242\or\hfA\hC176\hC187\or\hfB\hC152\hC157\hC219%
\or\hfB\hC241\or\hfA\hC176\hC36\or\hfB\hC152\hC125\hC208%
\or\hfB\hC152\hC127\hC209\or\hfB\hC152\hC125\hC212\or\hfB\hC152\hC125\hC216%
\or\hfB\hC152\hC127\hC218\or\hfB\hC152\hC125\hC220\or\hfA\hC129\hC137%
\or\hfA\hC201\hC215\hC228\or\hfA\hC201\hC217\or\hfA\hC201\hC215\hC234%
\or\hfA\hC201\hC215\hC239\or\hfA\hC201\hC215\hC240\fi}}

\DeclareRobustCommand{\HanGulI}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC201\hC215\hC241%
\or\hfA\hC201\hC215\hC242\or\hfA\hC105\hC111\or\hfA\hC201\hC218\hC228%
\or\hfA\hC201\hC218\hC231\or\hfA\hC201\hC218\hC234\or\hfA\hC201\hC218\hC239%
\or\hfA\hC201\hC218\hC240\or\hfA\hC201\hC218\hC241\or\hfA\hC201\hC218\hC242%
\or\hfA\hC201\hC218\hC243\or\hfA\hC201\hC218\hC246\or\hfA\hC201\hC218\hC247%
\or\hfA\hC19\hC36\or\hfB\hC19\hC36\hC184\or\hfB\hC19\hC39\hC187%
\or\hfB\hC19\hC36\hC191\or\hfB\hC19\hC36\hC196\or\hfB\hC19\hC36\hC197%
\or\hfB\hC19\hC39\hC199\or\hfB\hC19\hC36\hC201\or\hfA\hC20\hC34%
\or\hfB\hC20\hC34\hC184\or\hfB\hC20\hC37\hC187\or\hfB\hC20\hC34\hC189%
\or\hfB\hC20\hC34\hC190\or\hfB\hC20\hC34\hC191\or\hfB\hC20\hC34\hC192%
\or\hfB\hC20\hC34\hC193\or\hfB\hC20\hC34\hC196\or\hfB\hC20\hC34\hC197%
\or\hfB\hC20\hC37\hC199\or\hfB\hC20\hC34\hC201\or\hfB\hC20\hC34\hC202%
\or\hfB\hC20\hC34\hC205\or\hfB\hC20\hC34\hC207\or\hfA\hC54\hC64%
\or\hfB\hC65\hC75\hC184\or\hfB\hC65\hC77\hC187\or\hfB\hC65\hC75\hC191%
\or\hfB\hC65\hC75\hC196\or\hfB\hC65\hC75\hC197\or\hfB\hC65\hC77\hC199%
\or\hfB\hC65\hC75\hC200\or\hfB\hC65\hC75\hC201\or\hfB\hC65\hC75\hC202%
\or\hfA\hC20\hC35\or\hfB\hC20\hC35\hC184\or\hfB\hC20\hC35\hC191%
\or\hfB\hC20\hC35\hC201\or\hfA\hC20\hC41\or\hfB\hC20\hC44\hC184%
\or\hfB\hC20\hC46\hC187\or\hfB\hC20\hC44\hC191\or\hfB\hC20\hC44\hC193%
\or\hfB\hC20\hC44\hC196\or\hfB\hC20\hC44\hC197\or\hfB\hC20\hC46\hC199%
\or\hfB\hC20\hC44\hC201\or\hfB\hC20\hC44\hC202\or\hfB\hC20\hC44\hC207%
\or\hfA\hC54\hC76\or\hfB\hC65\hC90\hC184\or\hfB\hC65\hC92\hC187%
\or\hfB\hC65\hC90\hC191\or\hfB\hC65\hC90\hC196\or\hfB\hC65\hC90\hC197%
\or\hfB\hC65\hC92\hC199\or\hfB\hC65\hC90\hC200\or\hfB\hC65\hC90\hC201%
\or\hfA\hC20\hC42\or\hfB\hC20\hC45\hC184\or\hfB\hC20\hC47\hC187%
\or\hfB\hC20\hC45\hC191\or\hfB\hC20\hC47\hC199\or\hfB\hC20\hC45\hC200%
\or\hfB\hC20\hC45\hC201\or\hfB\hC20\hC45\hC203\or\hfA\hC54\hC77%
\or\hfA\hC94\hC102\or\hfA\hC202\hC212\hC228\or\hfA\hC202\hC212\hC230%
\or\hfA\hC202\hC212\hC231\or\hfA\hC202\hC212\hC234\or\hfA\hC202\hC212\hC236%
\or\hfA\hC202\hC212\hC239\or\hfA\hC202\hC212\hC240\or\hfA\hC202\hC212\hC241%
\or\hfA\hC202\hC212\hC242\or\hfA\hC146\hC158\or\hfB\hC112\hC126\hC209%
\or\hfB\hC112\hC124\hC219\or\hfB\hC112\hC124\hC220\or\hfA\hC146\hC36%
\fi}}

\DeclareRobustCommand{\HanGulJ}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC112\hC127\hC209\or\hfB\hC112\hC125\hC212\or\hfB\hC112\hC125\hC217%
\or\hfB\hC112\hC127\hC218\or\hfB\hC112\hC125\hC220\or\hfA\hC94\hC103%
\or\hfA\hC202\hC213\hC231\or\hfA\hC202\hC213\hC234\or\hfA\hC202\hC213\hC240%
\or\hfA\hC202\hC213\hC241\or\hfA\hC122\hC127\or\hfA\hC202\hC214\hC228%
\or\hfA\hC202\hC214\hC229\or\hfA\hC202\hC216\or\hfA\hC202\hC214\hC233%
\or\hfA\hC202\hC214\hC234\or\hfA\hC202\hC214\hC235\or\hfA\hC202\hC214\hC236%
\or\hfA\hC202\hC214\hC239\or\hfA\hC202\hC214\hC240\or\hfA\hC202\hC214\hC241%
\or\hfA\hC202\hC214\hC242\or\hfA\hC202\hC214\hC246\or\hfA\hC202\hC214\hC248%
\or\hfA\hC177\hC187\or\hfB\hC142\hC151\hC209\or\hfB\hC142\hC150\hC212%
\or\hfB\hC142\hC150\hC217\or\hfB\hC142\hC151\hC218\or\hfB\hC242%
\or\hfA\hC177\hC36\or\hfB\hC142\hC127\hC209\or\hfB\hC142\hC125\hC212%
\or\hfA\hC122\hC128\or\hfA\hC202\hC217\or\hfA\hC202\hC215\hC234%
\or\hfA\hC202\hC215\hC239\or\hfA\hC202\hC215\hC241\or\hfA\hC94\hC104%
\or\hfA\hC202\hC218\hC231\or\hfA\hC202\hC218\hC234\or\hfA\hC202\hC218\hC239%
\or\hfA\hC202\hC218\hC241\or\hfA\hC20\hC36\or\hfB\hC20\hC36\hC184%
\or\hfB\hC20\hC39\hC187\or\hfB\hC20\hC36\hC190\or\hfB\hC20\hC36\hC191%
\or\hfB\hC20\hC36\hC193\or\hfB\hC20\hC36\hC196\or\hfB\hC20\hC36\hC197%
\or\hfB\hC20\hC39\hC199\or\hfB\hC20\hC36\hC200\or\hfB\hC20\hC36\hC201%
\or\hfB\hC20\hC36\hC203\or\hfB\hC20\hC36\hC205\or\hfA\hC21\hC34%
\or\hfB\hC21\hC34\hC184\or\hfB\hC21\hC34\hC185\or\hfB\hC21\hC34\hC186%
\or\hfB\hC21\hC37\hC187\or\hfB\hC21\hC34\hC190\or\hfB\hC21\hC34\hC191%
\or\hfB\hC21\hC34\hC192\or\hfB\hC21\hC34\hC193\or\hfB\hC21\hC34\hC194%
\or\hfB\hC21\hC34\hC196\or\hfB\hC21\hC34\hC197\or\hfB\hC21\hC37\hC199%
\or\hfB\hC21\hC34\hC201\or\hfB\hC21\hC34\hC205\or\hfA\hC55\hC64%
\or\hfB\hC66\hC75\hC184\or\hfB\hC66\hC77\hC187\or\hfB\hC66\hC75\hC191%
\or\hfB\hC66\hC75\hC196\or\hfB\hC66\hC75\hC197\or\hfB\hC66\hC77\hC199%
\or\hfB\hC66\hC75\hC200\or\hfB\hC66\hC75\hC201\or\hfB\hC66\hC75\hC205%
\or\hfA\hC21\hC35\or\hfB\hC21\hC35\hC184\or\hfB\hC21\hC38\hC187%
\or\hfB\hC21\hC35\hC197\or\hfA\hC21\hC41\or\hfB\hC21\hC44\hC184%
\or\hfB\hC21\hC46\hC187\or\hfB\hC21\hC44\hC190\or\hfB\hC21\hC44\hC191%
\or\hfB\hC21\hC44\hC193\or\hfB\hC21\hC44\hC196\or\hfB\hC21\hC44\hC197%
\or\hfB\hC21\hC46\hC199\fi}}

\DeclareRobustCommand{\HanGulK}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC21\hC44\hC201\or\hfB\hC21\hC44\hC202%
\or\hfA\hC55\hC76\or\hfB\hC66\hC90\hC184\or\hfB\hC66\hC92\hC187%
\or\hfB\hC66\hC90\hC190\or\hfB\hC66\hC90\hC191\or\hfB\hC66\hC90\hC196%
\or\hfB\hC66\hC90\hC197\or\hfB\hC66\hC92\hC199\or\hfB\hC66\hC90\hC200%
\or\hfB\hC66\hC90\hC201\or\hfA\hC21\hC42\or\hfB\hC21\hC45\hC184%
\or\hfB\hC21\hC47\hC187\or\hfB\hC21\hC45\hC191\or\hfB\hC21\hC45\hC197%
\or\hfB\hC21\hC47\hC199\or\hfB\hC21\hC45\hC200\or\hfB\hC21\hC45\hC201%
\or\hfB\hC21\hC45\hC205\or\hfA\hC55\hC77\or\hfB\hC66\hC93\hC187%
\or\hfA\hC95\hC102\or\hfA\hC203\hC212\hC228\or\hfA\hC203\hC212\hC229%
\or\hfA\hC203\hC212\hC231\or\hfA\hC203\hC212\hC234\or\hfA\hC203\hC212\hC239%
\or\hfA\hC203\hC212\hC240\or\hfA\hC203\hC212\hC241\or\hfA\hC203\hC212\hC242%
\or\hfA\hC147\hC158\or\hfB\hC113\hC126\hC209\or\hfB\hC113\hC124\hC219%
\or\hfB\hC227\or\hfB\hC169\or\hfA\hC147\hC36%
\or\hfB\hC113\hC125\hC208\or\hfB\hC113\hC127\hC209\or\hfB\hC113\hC125\hC212%
\or\hfB\hC113\hC125\hC216\or\hfB\hC113\hC125\hC217\or\hfA\hC95\hC103%
\or\hfA\hC203\hC213\hC231\or\hfA\hC130\hC136\or\hfA\hC203\hC214\hC228%
\or\hfA\hC203\hC216\or\hfA\hC203\hC214\hC233\or\hfA\hC203\hC214\hC234%
\or\hfA\hC203\hC214\hC235\or\hfA\hC203\hC214\hC236\or\hfA\hC203\hC214\hC239%
\or\hfA\hC203\hC214\hC240\or\hfA\hC203\hC214\hC241\or\hfA\hC203\hC214\hC242%
\or\hfA\hC203\hC214\hC246\or\hfA\hC203\hC214\hC247\or\hfA\hC178\hC187%
\or\hfB\hC143\hC150\hC212\or\hfB\hC143\hC150\hC219\or\hfB\hC243%
\or\hfA\hC178\hC36\or\hfB\hC143\hC125\hC208\or\hfB\hC143\hC127\hC209%
\or\hfB\hC143\hC125\hC212\or\hfB\hC143\hC125\hC220\or\hfA\hC130\hC137%
\or\hfA\hC203\hC217\or\hfA\hC203\hC215\hC234\or\hfA\hC203\hC215\hC239%
\or\hfA\hC203\hC215\hC241\or\hfA\hC203\hC215\hC242\or\hfA\hC95\hC104%
\or\hfA\hC203\hC218\hC228\or\hfA\hC203\hC218\hC231\or\hfA\hC203\hC218\hC234%
\or\hfA\hC203\hC218\hC239\or\hfA\hC203\hC218\hC240\or\hfA\hC203\hC218\hC241%
\or\hfA\hC21\hC36\or\hfB\hC21\hC36\hC184\or\hfB\hC21\hC39\hC187%
\or\hfB\hC21\hC36\hC191\or\hfB\hC21\hC36\hC193\or\hfB\hC21\hC36\hC196%
\or\hfB\hC21\hC36\hC197\or\hfB\hC21\hC39\hC199\or\hfB\hC21\hC36\hC201%
\or\hfB\hC21\hC36\hC202\or\hfB\hC21\hC36\hC203\or\hfA\hC22\hC34%
\or\hfB\hC22\hC34\hC184\or\hfB\hC22\hC37\hC187\fi}}

\DeclareRobustCommand{\HanGulL}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC22\hC34\hC191%
\or\hfB\hC22\hC34\hC193\or\hfB\hC22\hC34\hC196\or\hfB\hC22\hC34\hC197%
\or\hfB\hC22\hC37\hC199\or\hfB\hC22\hC34\hC200\or\hfB\hC22\hC34\hC201%
\or\hfB\hC22\hC34\hC207\or\hfA\hC68\hC71\or\hfB\hC81\hC84\hC184%
\or\hfB\hC81\hC85\hC187\or\hfB\hC81\hC84\hC191\or\hfB\hC81\hC84\hC196%
\or\hfB\hC81\hC84\hC197\or\hfB\hC81\hC85\hC199\or\hfB\hC81\hC84\hC200%
\or\hfB\hC81\hC84\hC201\or\hfA\hC22\hC35\or\hfB\hC22\hC35\hC184%
\or\hfB\hC22\hC35\hC196\or\hfA\hC22\hC44\or\hfB\hC22\hC49\hC184%
\or\hfB\hC22\hC51\hC187\or\hfB\hC22\hC49\hC190\or\hfB\hC22\hC49\hC191%
\or\hfB\hC22\hC49\hC196\or\hfB\hC22\hC51\hC199\or\hfB\hC22\hC49\hC200%
\or\hfB\hC22\hC49\hC201\or\hfA\hC68\hC79\or\hfB\hC81\hC95\hC201%
\or\hfA\hC22\hC45\or\hfB\hC22\hC50\hC184\or\hfB\hC22\hC50\hC196%
\or\hfB\hC22\hC50\hC197\or\hfB\hC22\hC52\hC199\or\hfB\hC22\hC50\hC200%
\or\hfB\hC22\hC50\hC201\or\hfA\hC96\hC102\or\hfA\hC204\hC212\hC228%
\or\hfA\hC204\hC212\hC231\or\hfA\hC204\hC212\hC234\or\hfA\hC204\hC212\hC239%
\or\hfA\hC204\hC212\hC240\or\hfA\hC204\hC212\hC242\or\hfA\hC159%
\or\hfA\hC96\hC103\or\hfA\hC204\hC213\hC242\or\hfA\hC131\hC136%
\or\hfA\hC204\hC214\hC228\or\hfA\hC204\hC216\or\hfA\hC204\hC214\hC234%
\or\hfA\hC204\hC214\hC239\or\hfA\hC204\hC214\hC241\or\hfA\hC204\hC214\hC242%
\or\hfA\hC131\hC137\or\hfA\hC204\hC215\hC242\or\hfA\hC96\hC104%
\or\hfA\hC204\hC218\hC231\or\hfA\hC204\hC218\hC234\or\hfA\hC204\hC218\hC239%
\or\hfA\hC204\hC218\hC240\or\hfA\hC22\hC36\or\hfB\hC22\hC36\hC184%
\or\hfB\hC22\hC39\hC187\or\hfB\hC22\hC36\hC191\or\hfB\hC22\hC36\hC196%
\or\hfB\hC22\hC36\hC197\or\hfB\hC22\hC39\hC199\or\hfB\hC22\hC36\hC201%
\or\hfA\hC23\hC34\or\hfB\hC23\hC34\hC184\or\hfB\hC23\hC34\hC186%
\or\hfB\hC23\hC37\hC187\or\hfB\hC23\hC34\hC190\or\hfB\hC23\hC34\hC191%
\or\hfB\hC23\hC34\hC192\or\hfB\hC23\hC34\hC193\or\hfB\hC23\hC34\hC196%
\or\hfB\hC23\hC34\hC197\or\hfB\hC23\hC37\hC199\or\hfB\hC23\hC34\hC200%
\or\hfB\hC23\hC34\hC201\or\hfB\hC23\hC34\hC205\or\hfA\hC56\hC64%
\or\hfB\hC67\hC75\hC184\or\hfB\hC67\hC77\hC187\or\hfB\hC67\hC75\hC191%
\or\hfB\hC67\hC75\hC196\or\hfB\hC67\hC75\hC197\or\hfB\hC67\hC77\hC199%
\or\hfB\hC67\hC75\hC200\or\hfB\hC67\hC75\hC201\or\hfA\hC23\hC35%
\fi}}

\DeclareRobustCommand{\HanGulM}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC23\hC35\hC184\or\hfB\hC23\hC38\hC187\or\hfB\hC23\hC35\hC191%
\or\hfB\hC23\hC35\hC196\or\hfB\hC23\hC35\hC197\or\hfB\hC23\hC38\hC199%
\or\hfB\hC23\hC35\hC201\or\hfA\hC56\hC65\or\hfB\hC67\hC78\hC187%
\or\hfB\hC67\hC76\hC191\or\hfB\hC67\hC76\hC196\or\hfB\hC67\hC76\hC201%
\or\hfA\hC23\hC41\or\hfB\hC23\hC44\hC184\or\hfB\hC23\hC44\hC185%
\or\hfB\hC23\hC44\hC186\or\hfB\hC23\hC46\hC187\or\hfB\hC23\hC44\hC190%
\or\hfB\hC23\hC44\hC191\or\hfB\hC23\hC44\hC193\or\hfB\hC23\hC44\hC194%
\or\hfB\hC23\hC44\hC196\or\hfB\hC23\hC44\hC197\or\hfB\hC23\hC46\hC199%
\or\hfB\hC23\hC44\hC200\or\hfB\hC23\hC44\hC201\or\hfB\hC23\hC44\hC206%
\or\hfA\hC56\hC76\or\hfB\hC67\hC90\hC184\or\hfB\hC67\hC92\hC187%
\or\hfB\hC67\hC90\hC191\or\hfB\hC67\hC90\hC196\or\hfB\hC67\hC90\hC197%
\or\hfB\hC67\hC92\hC199\or\hfB\hC67\hC90\hC200\or\hfB\hC67\hC90\hC201%
\or\hfA\hC23\hC42\or\hfB\hC23\hC45\hC184\or\hfB\hC23\hC47\hC187%
\or\hfB\hC23\hC45\hC191\or\hfB\hC23\hC45\hC196\or\hfB\hC23\hC45\hC197%
\or\hfB\hC23\hC47\hC199\or\hfB\hC23\hC45\hC200\or\hfB\hC23\hC45\hC201%
\or\hfA\hC56\hC77\or\hfB\hC67\hC93\hC187\or\hfB\hC67\hC91\hC191%
\or\hfB\hC67\hC91\hC201\or\hfA\hC97\hC102\or\hfA\hC205\hC212\hC228%
\or\hfA\hC205\hC212\hC229\or\hfA\hC205\hC212\hC231\or\hfA\hC205\hC212\hC234%
\or\hfA\hC205\hC212\hC236\or\hfA\hC205\hC212\hC239\or\hfA\hC205\hC212\hC240%
\or\hfA\hC205\hC212\hC241\or\hfA\hC205\hC212\hC242\or\hfA\hC205\hC212\hC246%
\or\hfA\hC148\hC158\or\hfB\hC114\hC124\hC208\or\hfB\hC114\hC126\hC209%
\or\hfB\hC114\hC124\hC212\or\hfB\hC114\hC124\hC220\or\hfB\hC228%
\or\hfB\hC161\hC166\hC209\or\hfB\hC161\hC165\hC212\or\hfB\hC161\hC165\hC216%
\or\hfB\hC161\hC166\hC218\or\hfB\hC161\hC165\hC219\or\hfA\hC148\hC36%
\or\hfB\hC114\hC127\hC209\or\hfB\hC114\hC125\hC212\or\hfB\hC114\hC125\hC216%
\or\hfB\hC114\hC125\hC217\or\hfB\hC114\hC127\hC218\or\hfA\hC97\hC103%
\or\hfA\hC205\hC213\hC228\or\hfA\hC205\hC213\hC231\or\hfA\hC205\hC213\hC234%
\or\hfA\hC205\hC213\hC239\or\hfA\hC205\hC213\hC240\or\hfA\hC205\hC213\hC241%
\or\hfA\hC205\hC213\hC242\or\hfA\hC123\hC127\or\hfA\hC205\hC214\hC228%
\or\hfA\hC205\hC216\or\hfA\hC205\hC214\hC233\or\hfA\hC205\hC214\hC234%
\or\hfA\hC205\hC214\hC239\or\hfA\hC205\hC214\hC240\or\hfA\hC205\hC214\hC241%
\or\hfA\hC205\hC214\hC242\fi}}

\DeclareRobustCommand{\HanGulN}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC205\hC214\hC244\or\hfA\hC205\hC214\hC246%
\or\hfA\hC205\hC214\hC247\or\hfA\hC173\hC175\or\hfB\hC144\hC150\hC219%
\or\hfB\hC244\or\hfB\hC174\hC176\hC208\or\hfB\hC174\hC177\hC209%
\or\hfB\hC174\hC176\hC212\or\hfB\hC174\hC176\hC216\or\hfB\hC174\hC176\hC220%
\or\hfA\hC173\hC36\or\hfB\hC144\hC125\hC208\or\hfB\hC144\hC127\hC209%
\or\hfB\hC144\hC125\hC212\or\hfB\hC144\hC125\hC216\or\hfB\hC144\hC125\hC217%
\or\hfB\hC144\hC127\hC218\or\hfB\hC144\hC125\hC220\or\hfA\hC123\hC128%
\or\hfA\hC205\hC215\hC228\or\hfA\hC205\hC215\hC234\or\hfA\hC205\hC215\hC239%
\or\hfA\hC205\hC215\hC241\or\hfA\hC205\hC215\hC242\or\hfA\hC97\hC104%
\or\hfA\hC205\hC218\hC228\or\hfA\hC205\hC218\hC231\or\hfA\hC205\hC218\hC234%
\or\hfA\hC205\hC218\hC235\or\hfA\hC205\hC218\hC239\or\hfA\hC205\hC218\hC240%
\or\hfA\hC205\hC218\hC241\or\hfA\hC205\hC218\hC242\or\hfA\hC23\hC36%
\or\hfB\hC23\hC36\hC184\or\hfB\hC23\hC39\hC187\or\hfB\hC23\hC36\hC190%
\or\hfB\hC23\hC36\hC191\or\hfB\hC23\hC36\hC195\or\hfB\hC23\hC36\hC196%
\or\hfB\hC23\hC36\hC197\or\hfB\hC23\hC39\hC199\or\hfB\hC23\hC36\hC201%
\or\hfB\hC23\hC36\hC206\or\hfA\hC24\hC34\or\hfB\hC24\hC34\hC184%
\or\hfB\hC24\hC34\hC186\or\hfB\hC24\hC37\hC187\or\hfB\hC24\hC34\hC191%
\or\hfB\hC24\hC34\hC196\or\hfB\hC24\hC34\hC197\or\hfB\hC24\hC34\hC200%
\or\hfB\hC24\hC34\hC201\or\hfB\hC24\hC34\hC207\or\hfA\hC69\hC71%
\or\hfB\hC82\hC84\hC184\or\hfB\hC82\hC85\hC187\or\hfB\hC82\hC84\hC191%
\or\hfB\hC82\hC84\hC196\or\hfB\hC82\hC84\hC197\or\hfB\hC82\hC84\hC200%
\or\hfB\hC82\hC84\hC201\or\hfB\hC24\hC35\hC201\or\hfA\hC24\hC44%
\or\hfB\hC24\hC49\hC184\or\hfB\hC24\hC51\hC187\or\hfB\hC24\hC49\hC191%
\or\hfB\hC24\hC49\hC193\or\hfB\hC24\hC49\hC196\or\hfB\hC24\hC49\hC197%
\or\hfB\hC24\hC49\hC200\or\hfB\hC24\hC49\hC201\or\hfA\hC69\hC79%
\or\hfB\hC82\hC96\hC187\or\hfB\hC82\hC95\hC191\or\hfB\hC97%
\or\hfA\hC98\hC102\or\hfA\hC206\hC212\hC228\or\hfA\hC206\hC212\hC231%
\or\hfA\hC206\hC212\hC233\or\hfA\hC206\hC212\hC234\or\hfA\hC206\hC212\hC236%
\or\hfA\hC206\hC212\hC239\or\hfA\hC206\hC212\hC240\or\hfA\hC206\hC212\hC242%
\or\hfA\hC149\hC158\or\hfB\hC115\hC124\hC208\or\hfB\hC115\hC126\hC209%
\or\hfB\hC115\hC124\hC219\or\hfB\hC229\or\hfB\hC170%
\or\hfA\hC149\hC36\or\hfB\hC115\hC127\hC209\fi}}

\DeclareRobustCommand{\HanGulO}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC115\hC125\hC212%
\or\hfB\hC115\hC125\hC216\or\hfB\hC115\hC125\hC217\or\hfA\hC98\hC103%
\or\hfB\hC222\or\hfA\hC206\hC214\hC228\or\hfA\hC206\hC216%
\or\hfA\hC206\hC214\hC234\or\hfA\hC206\hC214\hC239\or\hfA\hC206\hC214\hC240%
\or\hfA\hC206\hC214\hC242\or\hfA\hC179\hC187\or\hfB\hC145\hC150\hC219%
\or\hfB\hC245\or\hfA\hC179\hC36\or\hfB\hC145\hC127\hC209%
\or\hfA\hC206\hC215\hC242\or\hfA\hC98\hC104\or\hfA\hC206\hC218\hC228%
\or\hfA\hC206\hC218\hC231\or\hfA\hC206\hC218\hC234\or\hfA\hC206\hC218\hC236%
\or\hfA\hC206\hC218\hC238\or\hfA\hC206\hC218\hC239\or\hfA\hC206\hC218\hC240%
\or\hfA\hC164\or\hfB\hC131\hC127\hC209\or\hfB\hC131\hC125\hC212%
\or\hfB\hC131\hC125\hC216\or\hfA\hC24\hC36\or\hfB\hC24\hC36\hC184%
\or\hfB\hC24\hC39\hC187\or\hfB\hC24\hC36\hC191\or\hfB\hC24\hC36\hC196%
\or\hfB\hC24\hC36\hC197\or\hfB\hC24\hC36\hC199\or\hfB\hC24\hC36\hC201%
\or\hfA\hC25\hC34\or\hfB\hC25\hC34\hC184\or\hfB\hC25\hC37\hC187%
\or\hfB\hC25\hC34\hC188\or\hfB\hC25\hC34\hC189\or\hfB\hC25\hC34\hC191%
\or\hfB\hC25\hC34\hC192\or\hfB\hC25\hC34\hC193\or\hfB\hC25\hC34\hC195%
\or\hfB\hC25\hC34\hC196\or\hfB\hC25\hC34\hC197\or\hfB\hC25\hC37\hC199%
\or\hfB\hC25\hC34\hC200\or\hfB\hC25\hC34\hC201\or\hfB\hC25\hC34\hC205%
\or\hfB\hC25\hC34\hC206\or\hfA\hC57\hC64\or\hfB\hC68\hC75\hC184%
\or\hfB\hC68\hC77\hC187\or\hfB\hC68\hC75\hC191\or\hfB\hC68\hC75\hC196%
\or\hfB\hC68\hC75\hC197\or\hfB\hC68\hC77\hC199\or\hfB\hC68\hC75\hC200%
\or\hfB\hC68\hC75\hC201\or\hfA\hC25\hC35\or\hfB\hC25\hC35\hC184%
\or\hfB\hC25\hC38\hC187\or\hfB\hC25\hC35\hC191\or\hfB\hC25\hC35\hC194%
\or\hfB\hC25\hC35\hC196\or\hfB\hC25\hC35\hC197\or\hfB\hC25\hC38\hC199%
\or\hfB\hC25\hC35\hC201\or\hfB\hC25\hC35\hC205\or\hfB\hC25\hC35\hC207%
\or\hfA\hC57\hC65\or\hfB\hC68\hC78\hC187\or\hfB\hC68\hC76\hC191%
\or\hfB\hC68\hC76\hC197\or\hfA\hC25\hC41\or\hfB\hC25\hC44\hC184%
\or\hfB\hC25\hC46\hC187\or\hfB\hC25\hC44\hC188\or\hfB\hC25\hC44\hC190%
\or\hfB\hC25\hC44\hC191\or\hfB\hC25\hC44\hC192\or\hfB\hC25\hC44\hC193%
\or\hfB\hC25\hC44\hC196\or\hfB\hC25\hC44\hC197\or\hfB\hC25\hC44\hC198%
\or\hfB\hC25\hC46\hC199\or\hfB\hC25\hC44\hC200\or\hfB\hC25\hC44\hC201%
\or\hfB\hC25\hC44\hC202\or\hfB\hC25\hC44\hC204\or\hfB\hC25\hC44\hC206%
\fi}}

\DeclareRobustCommand{\HanGulP}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC57\hC76\or\hfB\hC68\hC90\hC184\or\hfB\hC68\hC92\hC187%
\or\hfB\hC68\hC90\hC191\or\hfB\hC68\hC90\hC196\or\hfB\hC68\hC90\hC197%
\or\hfB\hC68\hC92\hC199\or\hfB\hC68\hC90\hC201\or\hfA\hC25\hC42%
\or\hfB\hC25\hC45\hC184\or\hfB\hC25\hC45\hC185\or\hfB\hC25\hC47\hC187%
\or\hfB\hC25\hC45\hC191\or\hfB\hC25\hC45\hC193\or\hfB\hC25\hC45\hC194%
\or\hfB\hC25\hC45\hC196\or\hfB\hC25\hC45\hC197\or\hfB\hC25\hC45\hC198%
\or\hfB\hC25\hC47\hC199\or\hfB\hC25\hC45\hC200\or\hfB\hC25\hC45\hC201%
\or\hfB\hC25\hC45\hC205\or\hfB\hC25\hC45\hC206\or\hfB\hC25\hC45\hC207%
\or\hfA\hC57\hC77\or\hfB\hC68\hC93\hC187\or\hfB\hC68\hC91\hC191%
\or\hfB\hC68\hC91\hC196\or\hfB\hC68\hC91\hC197\or\hfB\hC68\hC93\hC199%
\or\hfB\hC68\hC91\hC200\or\hfA\hC99\hC102\or\hfA\hC207\hC212\hC228%
\or\hfA\hC207\hC212\hC231\or\hfA\hC207\hC212\hC234\or\hfA\hC207\hC212\hC235%
\or\hfA\hC207\hC212\hC236\or\hfA\hC207\hC212\hC237\or\hfA\hC207\hC212\hC238%
\or\hfA\hC207\hC212\hC239\or\hfA\hC207\hC212\hC240\or\hfA\hC207\hC212\hC241%
\or\hfA\hC207\hC212\hC242\or\hfA\hC207\hC212\hC244\or\hfA\hC150\hC158%
\or\hfB\hC116\hC124\hC208\or\hfB\hC116\hC126\hC209\or\hfB\hC116\hC124\hC212%
\or\hfB\hC116\hC124\hC216\or\hfB\hC116\hC124\hC217\or\hfB\hC116\hC126\hC218%
\or\hfB\hC116\hC124\hC219\or\hfB\hC116\hC124\hC220\or\hfB\hC230%
\or\hfB\hC162\hC165\hC208\or\hfB\hC162\hC166\hC209\or\hfB\hC162\hC165\hC216%
\or\hfB\hC162\hC166\hC218\or\hfB\hC162\hC165\hC220\or\hfA\hC150\hC36%
\or\hfB\hC116\hC125\hC208\or\hfB\hC116\hC127\hC209\or\hfB\hC116\hC125\hC212%
\or\hfB\hC116\hC125\hC216\or\hfB\hC116\hC125\hC217\or\hfB\hC116\hC127\hC218%
\or\hfB\hC116\hC125\hC220\or\hfA\hC99\hC103\or\hfA\hC207\hC213\hC228%
\or\hfA\hC207\hC213\hC231\or\hfA\hC207\hC213\hC234\or\hfA\hC207\hC213\hC239%
\or\hfA\hC207\hC213\hC240\or\hfA\hC207\hC213\hC241\or\hfA\hC207\hC213\hC242%
\or\hfA\hC132\hC136\or\hfA\hC207\hC214\hC228\or\hfA\hC207\hC216%
\or\hfA\hC207\hC214\hC234\or\hfA\hC207\hC214\hC235\or\hfA\hC207\hC214\hC236%
\or\hfA\hC207\hC214\hC239\or\hfA\hC207\hC214\hC240\or\hfA\hC207\hC214\hC241%
\or\hfA\hC207\hC214\hC242\or\hfA\hC180\hC187\or\hfB\hC146\hC150\hC208%
\or\hfB\hC146\hC151\hC209\or\hfB\hC146\hC150\hC212\or\hfB\hC146\hC150\hC216%
\or\hfB\hC146\hC150\hC217\or\hfB\hC146\hC150\hC219\or\hfB\hC146\hC150\hC220%
\or\hfB\hC246\fi}}

\DeclareRobustCommand{\HanGulQ}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC175\hC176\hC208\or\hfB\hC175\hC177\hC209%
\or\hfB\hC175\hC176\hC212\or\hfB\hC175\hC176\hC216\or\hfB\hC175\hC176\hC217%
\or\hfB\hC175\hC176\hC220\or\hfA\hC180\hC36\or\hfB\hC146\hC125\hC208%
\or\hfB\hC146\hC127\hC209\or\hfB\hC146\hC125\hC212\or\hfB\hC146\hC125\hC216%
\or\hfB\hC146\hC125\hC217\or\hfB\hC146\hC127\hC218\or\hfB\hC146\hC125\hC220%
\or\hfA\hC132\hC137\or\hfA\hC207\hC215\hC228\or\hfA\hC207\hC217%
\or\hfA\hC207\hC215\hC234\or\hfA\hC207\hC215\hC239\or\hfA\hC207\hC215\hC240%
\or\hfA\hC207\hC215\hC241\or\hfA\hC207\hC215\hC242\or\hfA\hC207\hC215\hC244%
\or\hfA\hC99\hC104\or\hfA\hC207\hC218\hC228\or\hfA\hC207\hC218\hC231%
\or\hfA\hC207\hC218\hC234\or\hfB\hC252\or\hfA\hC207\hC218\hC239%
\or\hfA\hC207\hC218\hC240\or\hfA\hC207\hC218\hC241\or\hfA\hC207\hC218\hC242%
\or\hfA\hC207\hC218\hC243\or\hfA\hC207\hC218\hC244\or\hfA\hC207\hC218\hC245%
\or\hfA\hC207\hC218\hC246\or\hfA\hC207\hC218\hC247\or\hfA\hC207\hC218\hC248%
\or\hfA\hC165\or\hfB\hC132\hC127\hC209\or\hfB\hC132\hC125\hC212%
\or\hfB\hC132\hC125\hC216\or\hfB\hC132\hC127\hC218\or\hfA\hC25\hC36%
\or\hfB\hC25\hC36\hC184\or\hfB\hC25\hC39\hC187\or\hfB\hC25\hC36\hC191%
\or\hfB\hC25\hC36\hC192\or\hfB\hC25\hC36\hC193\or\hfB\hC25\hC36\hC195%
\or\hfB\hC25\hC36\hC196\or\hfB\hC25\hC36\hC197\or\hfB\hC25\hC39\hC199%
\or\hfB\hC25\hC36\hC200\or\hfB\hC25\hC36\hC201\or\hfB\hC25\hC36\hC202%
\or\hfB\hC25\hC36\hC206\or\hfA\hC26\hC34\or\hfB\hC26\hC34\hC184%
\or\hfB\hC26\hC37\hC187\or\hfB\hC26\hC34\hC189\or\hfB\hC26\hC34\hC190%
\or\hfB\hC26\hC34\hC191\or\hfB\hC26\hC34\hC193\or\hfB\hC26\hC34\hC196%
\or\hfB\hC26\hC34\hC197\or\hfB\hC26\hC37\hC199\or\hfB\hC26\hC34\hC200%
\or\hfB\hC26\hC34\hC201\or\hfB\hC26\hC34\hC202\or\hfA\hC58\hC64%
\or\hfB\hC69\hC75\hC184\or\hfB\hC69\hC77\hC187\or\hfB\hC69\hC75\hC191%
\or\hfB\hC69\hC75\hC196\or\hfB\hC69\hC75\hC197\or\hfB\hC69\hC77\hC199%
\or\hfB\hC69\hC75\hC200\or\hfB\hC69\hC75\hC201\or\hfA\hC26\hC35%
\or\hfB\hC26\hC35\hC184\or\hfB\hC26\hC38\hC187\or\hfB\hC26\hC35\hC189%
\or\hfB\hC26\hC35\hC191\or\hfB\hC26\hC35\hC196\or\hfB\hC26\hC35\hC201%
\or\hfA\hC58\hC65\or\hfB\hC69\hC78\hC187\or\hfB\hC69\hC76\hC191%
\or\hfA\hC26\hC41\or\hfB\hC26\hC44\hC184\or\hfB\hC26\hC46\hC187%
\or\hfB\hC26\hC44\hC191\or\hfB\hC26\hC44\hC193\fi}}

\DeclareRobustCommand{\HanGulR}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC26\hC44\hC196%
\or\hfB\hC26\hC44\hC197\or\hfB\hC26\hC46\hC199\or\hfB\hC26\hC44\hC201%
\or\hfB\hC26\hC44\hC202\or\hfA\hC58\hC76\or\hfB\hC69\hC90\hC184%
\or\hfB\hC69\hC92\hC187\or\hfB\hC69\hC90\hC191\or\hfB\hC69\hC90\hC196%
\or\hfB\hC69\hC90\hC197\or\hfB\hC69\hC92\hC199\or\hfB\hC69\hC90\hC201%
\or\hfA\hC26\hC42\or\hfB\hC26\hC47\hC187\or\hfB\hC26\hC45\hC191%
\or\hfB\hC26\hC45\hC196\or\hfB\hC26\hC45\hC197\or\hfB\hC26\hC45\hC200%
\or\hfB\hC26\hC45\hC201\or\hfA\hC58\hC77\or\hfA\hC100\hC102%
\or\hfA\hC208\hC212\hC228\or\hfA\hC208\hC212\hC231\or\hfA\hC208\hC212\hC234%
\or\hfA\hC208\hC212\hC236\or\hfA\hC208\hC212\hC239\or\hfA\hC208\hC212\hC240%
\or\hfA\hC208\hC212\hC241\or\hfA\hC208\hC212\hC242\or\hfA\hC208\hC212\hC243%
\or\hfA\hC208\hC212\hC244\or\hfA\hC208\hC212\hC248\or\hfA\hC151\hC158%
\or\hfB\hC117\hC124\hC208\or\hfB\hC117\hC124\hC212\or\hfB\hC117\hC124\hC217%
\or\hfB\hC117\hC126\hC218\or\hfB\hC117\hC124\hC220\or\hfB\hC231%
\or\hfB\hC163\hC165\hC219\or\hfB\hC163\hC165\hC220\or\hfA\hC151\hC36%
\or\hfB\hC117\hC127\hC209\or\hfB\hC117\hC125\hC212\or\hfB\hC117\hC125\hC216%
\or\hfB\hC117\hC125\hC217\or\hfB\hC117\hC127\hC218\or\hfB\hC117\hC125\hC220%
\or\hfA\hC100\hC103\or\hfA\hC208\hC213\hC228\or\hfA\hC208\hC213\hC231%
\or\hfA\hC208\hC213\hC242\or\hfA\hC124\hC127\or\hfA\hC208\hC214\hC228%
\or\hfA\hC208\hC216\or\hfA\hC208\hC214\hC234\or\hfA\hC208\hC214\hC235%
\or\hfA\hC208\hC214\hC236\or\hfA\hC208\hC214\hC239\or\hfA\hC208\hC214\hC240%
\or\hfA\hC208\hC214\hC241\or\hfA\hC208\hC214\hC242\or\hfA\hC181\hC187%
\or\hfB\hC147\hC150\hC219\or\hfB\hC247\or\hfA\hC181\hC36%
\or\hfB\hC147\hC125\hC208\or\hfB\hC147\hC127\hC209\or\hfB\hC147\hC125\hC212%
\or\hfB\hC147\hC125\hC216\or\hfB\hC147\hC125\hC217\or\hfB\hC147\hC125\hC218%
\or\hfA\hC124\hC128\or\hfA\hC208\hC217\or\hfA\hC208\hC215\hC234%
\or\hfA\hC208\hC215\hC239\or\hfA\hC100\hC104\or\hfA\hC208\hC218\hC228%
\or\hfA\hC208\hC218\hC231\or\hfA\hC208\hC218\hC234\or\hfA\hC208\hC218\hC239%
\or\hfA\hC208\hC218\hC240\or\hfA\hC208\hC218\hC241\or\hfA\hC208\hC218\hC242%
\or\hfA\hC26\hC36\or\hfB\hC26\hC36\hC184\or\hfB\hC26\hC39\hC187%
\or\hfB\hC26\hC36\hC190\or\hfB\hC26\hC36\hC191\or\hfB\hC26\hC36\hC193%
\or\hfB\hC26\hC36\hC196\or\hfB\hC26\hC36\hC197\or\hfB\hC26\hC39\hC199%
\fi}}

\DeclareRobustCommand{\HanGulS}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC26\hC36\hC201\or\hfB\hC26\hC36\hC202\or\hfB\hC26\hC36\hC205%
\or\hfB\hC26\hC36\hC206\or\hfA\hC27\hC34\or\hfB\hC27\hC34\hC184%
\or\hfB\hC27\hC37\hC187\or\hfB\hC27\hC34\hC189\or\hfB\hC27\hC34\hC191%
\or\hfB\hC27\hC34\hC194\or\hfB\hC27\hC34\hC196\or\hfB\hC27\hC34\hC197%
\or\hfB\hC27\hC37\hC199\or\hfB\hC27\hC34\hC200\or\hfB\hC27\hC34\hC201%
\or\hfA\hC70\hC71\or\hfB\hC83\hC84\hC184\or\hfB\hC83\hC85\hC187%
\or\hfB\hC83\hC84\hC191\or\hfB\hC83\hC84\hC196\or\hfB\hC83\hC84\hC197%
\or\hfB\hC83\hC85\hC199\or\hfB\hC83\hC84\hC200\or\hfB\hC83\hC84\hC201%
\or\hfA\hC27\hC35\or\hfB\hC27\hC38\hC187\or\hfB\hC27\hC35\hC201%
\or\hfA\hC27\hC46\or\hfB\hC27\hC49\hC184\or\hfB\hC27\hC51\hC187%
\or\hfB\hC27\hC49\hC191\or\hfB\hC27\hC49\hC196\or\hfB\hC27\hC49\hC197%
\or\hfB\hC27\hC51\hC199\or\hfB\hC27\hC49\hC200\or\hfB\hC27\hC49\hC201%
\or\hfA\hC70\hC79\or\hfB\hC83\hC95\hC201\or\hfA\hC27\hC45%
\or\hfB\hC27\hC50\hC200\or\hfA\hC101\hC102\or\hfA\hC209\hC212\hC228%
\or\hfA\hC209\hC212\hC231\or\hfA\hC209\hC212\hC234\or\hfA\hC209\hC212\hC239%
\or\hfA\hC209\hC212\hC240\or\hfA\hC209\hC212\hC241\or\hfA\hC209\hC212\hC242%
\or\hfA\hC209\hC212\hC244\or\hfA\hC152\hC158\or\hfB\hC118\hC124\hC208%
\or\hfB\hC118\hC124\hC212\or\hfB\hC118\hC124\hC219\or\hfB\hC232%
\or\hfB\hC171\or\hfA\hC152\hC36\or\hfB\hC118\hC127\hC209%
\or\hfB\hC118\hC125\hC212\or\hfB\hC118\hC125\hC216\or\hfB\hC118\hC125\hC217%
\or\hfA\hC209\hC213\hC242\or\hfA\hC125\hC127\or\hfA\hC209\hC214\hC228%
\or\hfA\hC209\hC216\or\hfA\hC209\hC214\hC234\or\hfA\hC209\hC214\hC239%
\or\hfA\hC209\hC214\hC240\or\hfA\hC209\hC214\hC242\or\hfA\hC182\hC187%
\or\hfB\hC148\hC150\hC219\or\hfB\hC148\hC150\hC220\or\hfA\hC182\hC36%
\or\hfA\hC125\hC128\or\hfA\hC101\hC104\or\hfA\hC209\hC218\hC239%
\or\hfA\hC209\hC218\hC241\or\hfA\hC209\hC218\hC242\or\hfA\hC27\hC36%
\or\hfB\hC27\hC36\hC184\or\hfB\hC27\hC39\hC187\or\hfB\hC27\hC36\hC191%
\or\hfB\hC27\hC36\hC196\or\hfB\hC27\hC36\hC197\or\hfB\hC27\hC36\hC201%
\or\hfB\hC27\hC36\hC202\or\hfB\hC27\hC36\hC207\or\hfA\hC28\hC34%
\or\hfB\hC28\hC124\hC208\or\hfB\hC28\hC126\hC209\or\hfB\hC28\hC124\hC210%
\or\hfB\hC28\hC124\hC212\or\hfB\hC28\hC124\hC216\or\hfB\hC28\hC124\hC217%
\or\hfB\hC28\hC126\hC218\fi}}

\DeclareRobustCommand{\HanGulT}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC28\hC124\hC219\or\hfB\hC28\hC124\hC220%
\or\hfB\hC28\hC124\hC221\or\hfA\hC59\hC64\or\hfB\hC70\hC75\hC208%
\or\hfB\hC70\hC77\hC209\or\hfB\hC70\hC75\hC212\or\hfB\hC70\hC75\hC216%
\or\hfB\hC70\hC75\hC217\or\hfB\hC70\hC77\hC218\or\hfB\hC70\hC75\hC219%
\or\hfB\hC70\hC75\hC220\or\hfA\hC28\hC35\or\hfB\hC28\hC38\hC209%
\or\hfB\hC28\hC35\hC210\or\hfB\hC28\hC35\hC212\or\hfB\hC28\hC35\hC216%
\or\hfB\hC28\hC35\hC220\or\hfA\hC28\hC41\or\hfB\hC28\hC53\hC208%
\or\hfB\hC28\hC55\hC209\or\hfB\hC28\hC53\hC212\or\hfB\hC28\hC53\hC216%
\or\hfB\hC28\hC53\hC217\or\hfB\hC28\hC55\hC218\or\hfB\hC28\hC44\hC219%
\or\hfB\hC28\hC44\hC220\or\hfA\hC59\hC81\or\hfB\hC70\hC98\hC208%
\or\hfB\hC70\hC100\hC209\or\hfB\hC70\hC98\hC212\or\hfB\hC70\hC98\hC216%
\or\hfB\hC70\hC98\hC217\or\hfB\hC70\hC100\hC218\or\hfB\hC70\hC98\hC220%
\or\hfA\hC28\hC47\or\hfB\hC28\hC56\hC209\or\hfB\hC28\hC54\hC219%
\or\hfA\hC59\hC82\or\hfB\hC70\hC101\hC209\or\hfB\hC70\hC99\hC220%
\or\hfA\hC106\hC109\or\hfA\hC219\hC221\hC249\or\hfA\hC219\hC221\hC231%
\or\hfA\hC219\hC221\hC250\or\hfA\hC219\hC221\hC252\or\hfA\hC219\hC221\hC253%
\or\hfA\hC219\hC221\hC254\or\hfA\hC219\hC221\hC242\or\hfA\hC153\hC158%
\or\hfB\hC119\hC126\hC209\or\hfB\hC119\hC124\hC212\or\hfB\hC119\hC124\hC220%
\or\hfA\hC153\hC36\or\hfB\hC119\hC127\hC209\or\hfB\hC119\hC125\hC212%
\or\hfB\hC119\hC125\hC216\or\hfB\hC119\hC125\hC217\or\hfB\hC119\hC127\hC218%
\or\hfB\hC119\hC125\hC220\or\hfA\hC106\hC110\or\hfA\hC219\hC222\hC252%
\or\hfA\hC133\hC136\or\hfA\hC219\hC223\hC249\or\hfA\hC219\hC225%
\or\hfA\hC219\hC223\hC250\or\hfA\hC219\hC223\hC252\or\hfA\hC219\hC223\hC253%
\or\hfA\hC219\hC223\hC254\or\hfA\hC219\hC223\hC242\or\hfA\hC183\hC187%
\or\hfB\hC153\hC157\hC219\or\hfB\hC248\or\hfB\hC182%
\or\hfA\hC183\hC36\or\hfB\hC153\hC127\hC209\or\hfB\hC153\hC125\hC212%
\or\hfB\hC153\hC125\hC216\or\hfB\hC153\hC125\hC217\or\hfB\hC153\hC127\hC218%
\or\hfB\hC153\hC125\hC220\or\hfA\hC133\hC137\or\hfA\hC219\hC226%
\or\hfA\hC219\hC224\hC250\or\hfA\hC219\hC224\hC252\or\hfA\hC219\hC224\hC242%
\or\hfA\hC106\hC111\or\hfA\hC219\hC227\hC249\or\hfA\hC219\hC227\hC231%
\or\hfA\hC219\hC227\hC250\or\hfA\hC219\hC227\hC252\or\hfA\hC219\hC227\hC253%
\or\hfA\hC219\hC227\hC254\or\hfA\hC219\hC227\hC242\fi}}

\DeclareRobustCommand{\HanGulU}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC28\hC36%
\or\hfB\hC28\hC125\hC208\or\hfB\hC28\hC127\hC209\or\hfB\hC28\hC125\hC211%
\or\hfB\hC28\hC125\hC212\or\hfB\hC28\hC125\hC213\or\hfB\hC28\hC125\hC216%
\or\hfB\hC28\hC125\hC217\or\hfB\hC28\hC127\hC218\or\hfB\hC28\hC125\hC220%
\or\hfA\hC29\hC34\or\hfB\hC29\hC34\hC184\or\hfB\hC29\hC37\hC187%
\or\hfB\hC29\hC34\hC191\or\hfB\hC29\hC34\hC196\or\hfB\hC29\hC34\hC197%
\or\hfB\hC29\hC37\hC199\or\hfB\hC29\hC34\hC201\or\hfA\hC60\hC64%
\or\hfB\hC71\hC75\hC184\or\hfB\hC71\hC77\hC187\or\hfB\hC71\hC75\hC191%
\or\hfB\hC71\hC75\hC196\or\hfB\hC71\hC75\hC197\or\hfB\hC71\hC77\hC199%
\or\hfB\hC71\hC75\hC200\or\hfB\hC71\hC75\hC201\or\hfA\hC29\hC35%
\or\hfB\hC29\hC35\hC184\or\hfB\hC29\hC35\hC201\or\hfA\hC29\hC41%
\or\hfB\hC29\hC44\hC184\or\hfB\hC29\hC46\hC187\or\hfB\hC29\hC44\hC190%
\or\hfB\hC29\hC44\hC191\or\hfB\hC29\hC44\hC196\or\hfB\hC29\hC44\hC197%
\or\hfB\hC29\hC46\hC199\or\hfB\hC29\hC44\hC200\or\hfB\hC29\hC44\hC201%
\or\hfA\hC60\hC76\or\hfB\hC71\hC90\hC184\or\hfB\hC71\hC92\hC187%
\or\hfB\hC71\hC90\hC191\or\hfB\hC71\hC90\hC196\or\hfB\hC71\hC90\hC197%
\or\hfB\hC71\hC90\hC199\or\hfB\hC71\hC90\hC201\or\hfA\hC29\hC42%
\or\hfB\hC29\hC47\hC187\or\hfB\hC29\hC45\hC191\or\hfB\hC29\hC45\hC196%
\or\hfB\hC29\hC45\hC197\or\hfB\hC29\hC47\hC199\or\hfB\hC29\hC45\hC200%
\or\hfB\hC29\hC45\hC201\or\hfA\hC60\hC77\or\hfA\hC86\hC87%
\or\hfA\hC189\hC190\hC228\or\hfA\hC189\hC190\hC231\or\hfA\hC189\hC190\hC234%
\or\hfA\hC189\hC190\hC239\or\hfA\hC189\hC190\hC240\or\hfA\hC189\hC190\hC241%
\or\hfA\hC189\hC190\hC242\or\hfA\hC154\hC158\or\hfB\hC120\hC124\hC208%
\or\hfB\hC120\hC126\hC209\or\hfB\hC120\hC124\hC212\or\hfB\hC120\hC124\hC216%
\or\hfB\hC120\hC124\hC220\or\hfB\hC233\or\hfB\hC172%
\or\hfA\hC154\hC36\or\hfB\hC120\hC125\hC212\or\hfA\hC86\hC88%
\or\hfA\hC126\hC127\or\hfA\hC189\hC194\hC228\or\hfA\hC189\hC196%
\or\hfA\hC189\hC194\hC234\or\hfA\hC189\hC194\hC239\or\hfA\hC189\hC194\hC240%
\or\hfA\hC189\hC194\hC241\or\hfA\hC189\hC194\hC242\or\hfA\hC174\hC175%
\or\hfB\hC149\hC151\hC209\or\hfB\hC149\hC150\hC212\or\hfB\hC149\hC150\hC220%
\or\hfB\hC249\or\hfB\hC183\or\hfA\hC174\hC36%
\or\hfB\hC149\hC125\hC208\or\hfB\hC149\hC127\hC209\or\hfB\hC149\hC125\hC212%
\fi}}

\DeclareRobustCommand{\HanGulV}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC149\hC125\hC216\or\hfB\hC149\hC125\hC217\or\hfB\hC149\hC127\hC218%
\or\hfB\hC149\hC125\hC220\or\hfA\hC126\hC128\or\hfA\hC189\hC197%
\or\hfA\hC189\hC195\hC234\or\hfA\hC189\hC195\hC239\or\hfA\hC86\hC91%
\or\hfA\hC189\hC198\hC228\or\hfA\hC189\hC198\hC231\or\hfA\hC189\hC198\hC234%
\or\hfA\hC189\hC198\hC239\or\hfA\hC189\hC198\hC240\or\hfA\hC189\hC198\hC242%
\or\hfA\hC29\hC36\or\hfB\hC29\hC36\hC184\or\hfB\hC29\hC39\hC187%
\or\hfB\hC29\hC36\hC191\or\hfB\hC29\hC36\hC196\or\hfB\hC29\hC36\hC197%
\or\hfB\hC29\hC39\hC199\or\hfB\hC29\hC36\hC201\or\hfA\hC30\hC34%
\or\hfB\hC30\hC34\hC184\or\hfB\hC30\hC37\hC187\or\hfB\hC30\hC34\hC191%
\or\hfB\hC30\hC34\hC192\or\hfB\hC30\hC34\hC196\or\hfB\hC30\hC34\hC197%
\or\hfB\hC30\hC37\hC199\or\hfB\hC30\hC34\hC200\or\hfB\hC30\hC34\hC201%
\or\hfA\hC61\hC64\or\hfB\hC72\hC75\hC184\or\hfB\hC72\hC77\hC187%
\or\hfB\hC72\hC75\hC191\or\hfB\hC72\hC75\hC196\or\hfB\hC72\hC75\hC197%
\or\hfB\hC72\hC77\hC199\or\hfB\hC72\hC75\hC200\or\hfB\hC72\hC75\hC201%
\or\hfA\hC30\hC35\or\hfB\hC30\hC35\hC201\or\hfA\hC39\hC41%
\or\hfB\hC42\hC44\hC184\or\hfB\hC42\hC46\hC187\or\hfB\hC42\hC44\hC191%
\or\hfB\hC42\hC44\hC193\or\hfB\hC42\hC44\hC196\or\hfB\hC42\hC44\hC197%
\or\hfB\hC42\hC46\hC199\or\hfB\hC42\hC44\hC200\or\hfB\hC42\hC44\hC201%
\or\hfA\hC74\hC76\or\hfB\hC88\hC90\hC184\or\hfB\hC88\hC92\hC187%
\or\hfB\hC88\hC90\hC191\or\hfB\hC88\hC90\hC196\or\hfB\hC88\hC90\hC197%
\or\hfB\hC88\hC92\hC199\or\hfB\hC88\hC90\hC201\or\hfA\hC39\hC42%
\or\hfB\hC42\hC47\hC187\or\hfB\hC42\hC45\hC200\or\hfA\hC74\hC77%
\or\hfB\hC88\hC93\hC187\or\hfA\hC107\hC109\or\hfA\hC210\hC212\hC228%
\or\hfA\hC210\hC212\hC231\or\hfA\hC210\hC212\hC234\or\hfA\hC210\hC212\hC239%
\or\hfA\hC210\hC212\hC240\or\hfA\hC210\hC212\hC241\or\hfA\hC210\hC212\hC242%
\or\hfA\hC210\hC212\hC247\or\hfA\hC155\hC158\or\hfB\hC121\hC126\hC209%
\or\hfB\hC234\or\hfA\hC155\hC36\or\hfB\hC121\hC127\hC209%
\or\hfB\hC121\hC127\hC218\or\hfB\hC121\hC125\hC220\or\hfA\hC107\hC110%
\or\hfA\hC134\hC136\or\hfA\hC210\hC214\hC228\or\hfA\hC210\hC216%
\or\hfA\hC210\hC214\hC234\or\hfA\hC210\hC214\hC239\or\hfA\hC210\hC214\hC240%
\or\hfA\hC210\hC214\hC241\or\hfA\hC210\hC214\hC242\or\hfA\hC184\hC187%
\or\hfB\hC154\hC157\hC219\fi}}

\DeclareRobustCommand{\HanGulW}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC250\or\hfA\hC184\hC36%
\or\hfB\hC154\hC125\hC208\or\hfB\hC154\hC127\hC209\or\hfB\hC154\hC125\hC212%
\or\hfB\hC154\hC125\hC216\or\hfB\hC154\hC125\hC217\or\hfB\hC154\hC125\hC220%
\or\hfA\hC134\hC137\or\hfA\hC210\hC217\or\hfA\hC210\hC215\hC234%
\or\hfA\hC210\hC215\hC239\or\hfA\hC210\hC215\hC242\or\hfA\hC107\hC111%
\or\hfA\hC210\hC218\hC228\or\hfA\hC210\hC218\hC231\or\hfA\hC210\hC218\hC233%
\or\hfA\hC210\hC218\hC234\or\hfA\hC210\hC218\hC236\or\hfA\hC210\hC218\hC239%
\or\hfA\hC210\hC218\hC240\or\hfA\hC210\hC218\hC241\or\hfA\hC166%
\or\hfB\hC133\hC127\hC209\or\hfB\hC133\hC125\hC212\or\hfB\hC133\hC125\hC216%
\or\hfB\hC133\hC125\hC217\or\hfA\hC30\hC36\or\hfB\hC30\hC36\hC184%
\or\hfB\hC30\hC39\hC187\or\hfB\hC30\hC36\hC191\or\hfB\hC30\hC36\hC196%
\or\hfB\hC30\hC36\hC197\or\hfB\hC30\hC39\hC199\or\hfB\hC30\hC36\hC201%
\or\hfA\hC31\hC34\or\hfB\hC31\hC34\hC184\or\hfB\hC31\hC34\hC185%
\or\hfB\hC31\hC37\hC187\or\hfB\hC31\hC34\hC191\or\hfB\hC31\hC34\hC193%
\or\hfB\hC31\hC34\hC196\or\hfB\hC31\hC34\hC197\or\hfB\hC31\hC37\hC199%
\or\hfB\hC31\hC34\hC200\or\hfB\hC31\hC34\hC201\or\hfB\hC31\hC34\hC205%
\or\hfA\hC62\hC64\or\hfB\hC73\hC75\hC184\or\hfB\hC73\hC77\hC187%
\or\hfB\hC73\hC75\hC191\or\hfB\hC73\hC75\hC196\or\hfB\hC73\hC75\hC197%
\or\hfB\hC73\hC77\hC199\or\hfB\hC73\hC75\hC200\or\hfB\hC73\hC75\hC201%
\or\hfA\hC31\hC35\or\hfB\hC31\hC35\hC184\or\hfA\hC40\hC41%
\or\hfB\hC43\hC44\hC184\or\hfB\hC43\hC46\hC187\or\hfB\hC43\hC44\hC191%
\or\hfB\hC43\hC44\hC196\or\hfB\hC43\hC44\hC197\or\hfB\hC43\hC46\hC199%
\or\hfB\hC43\hC44\hC200\or\hfB\hC43\hC44\hC201\or\hfA\hC75\hC76%
\or\hfB\hC89\hC90\hC184\or\hfB\hC89\hC92\hC187\or\hfB\hC89\hC90\hC191%
\or\hfB\hC89\hC90\hC196\or\hfB\hC89\hC90\hC197\or\hfB\hC89\hC92\hC199%
\or\hfB\hC89\hC90\hC201\or\hfA\hC40\hC42\or\hfB\hC43\hC47\hC187%
\or\hfB\hC43\hC45\hC191\or\hfB\hC43\hC45\hC196\or\hfB\hC43\hC45\hC197%
\or\hfB\hC43\hC45\hC200\or\hfB\hC43\hC45\hC201\or\hfA\hC75\hC77%
\or\hfB\hC89\hC91\hC191\or\hfB\hC89\hC91\hC197\or\hfB\hC89\hC93\hC199%
\or\hfA\hC108\hC109\or\hfA\hC211\hC212\hC228\or\hfA\hC211\hC212\hC231%
\or\hfA\hC211\hC212\hC234\or\hfA\hC211\hC212\hC239\or\hfA\hC211\hC212\hC240%
\or\hfA\hC211\hC212\hC241\or\hfA\hC211\hC212\hC242\fi}}

\DeclareRobustCommand{\HanGulX}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfA\hC156\hC158%
\or\hfB\hC122\hC124\hC220\or\hfA\hC156\hC36\or\hfB\hC122\hC127\hC209%
\or\hfA\hC108\hC110\or\hfA\hC211\hC213\hC231\or\hfA\hC211\hC213\hC234%
\or\hfA\hC211\hC213\hC240\or\hfA\hC211\hC213\hC241\or\hfA\hC135\hC136%
\or\hfA\hC211\hC214\hC228\or\hfA\hC211\hC216\or\hfA\hC211\hC214\hC233%
\or\hfA\hC211\hC214\hC234\or\hfA\hC211\hC214\hC236\or\hfA\hC211\hC214\hC239%
\or\hfA\hC211\hC214\hC240\or\hfA\hC211\hC214\hC241\or\hfA\hC211\hC214\hC242%
\or\hfA\hC185\hC187\or\hfB\hC155\hC157\hC220\or\hfA\hC185\hC36%
\or\hfB\hC155\hC127\hC209\or\hfB\hC155\hC125\hC212\or\hfB\hC155\hC125\hC216%
\or\hfB\hC155\hC127\hC218\or\hfA\hC135\hC137\or\hfA\hC211\hC217%
\or\hfA\hC211\hC215\hC234\or\hfA\hC211\hC215\hC239\or\hfA\hC211\hC215\hC241%
\or\hfA\hC211\hC215\hC242\or\hfA\hC108\hC111\or\hfA\hC211\hC218\hC231%
\or\hfA\hC211\hC218\hC234\or\hfA\hC211\hC218\hC239\or\hfA\hC211\hC218\hC240%
\or\hfA\hC211\hC218\hC241\or\hfA\hC31\hC36\or\hfB\hC31\hC36\hC184%
\or\hfB\hC31\hC39\hC187\or\hfB\hC31\hC36\hC191\or\hfB\hC31\hC36\hC196%
\or\hfB\hC31\hC36\hC197\or\hfB\hC31\hC39\hC199\or\hfB\hC31\hC36\hC201%
\or\hfA\hC33\hC34\or\hfB\hC33\hC124\hC208\or\hfB\hC33\hC126\hC209%
\or\hfB\hC33\hC124\hC212\or\hfB\hC33\hC124\hC215\or\hfB\hC33\hC124\hC216%
\or\hfB\hC33\hC124\hC217\or\hfB\hC33\hC126\hC218\or\hfB\hC33\hC124\hC220%
\or\hfA\hC63\hC64\or\hfB\hC74\hC75\hC208\or\hfB\hC74\hC77\hC209%
\or\hfB\hC74\hC75\hC212\or\hfB\hC74\hC75\hC216\or\hfB\hC74\hC75\hC217%
\or\hfB\hC74\hC77\hC218\or\hfB\hC74\hC75\hC219\or\hfB\hC74\hC75\hC220%
\or\hfA\hC33\hC35\or\hfB\hC33\hC35\hC220\or\hfA\hC33\hC46%
\or\hfB\hC33\hC53\hC208\or\hfB\hC33\hC55\hC209\or\hfB\hC33\hC53\hC212%
\or\hfB\hC33\hC53\hC214\or\hfB\hC33\hC53\hC216\or\hfB\hC33\hC53\hC217%
\or\hfB\hC33\hC55\hC218\or\hfB\hC33\hC53\hC220\or\hfA\hC63\hC81%
\or\hfB\hC74\hC98\hC208\or\hfB\hC74\hC100\hC209\or\hfB\hC74\hC98\hC212%
\or\hfB\hC74\hC98\hC216\or\hfB\hC74\hC98\hC217\or\hfB\hC74\hC100\hC218%
\or\hfB\hC74\hC98\hC220\or\hfA\hC33\hC47\or\hfB\hC33\hC54\hC208%
\or\hfB\hC33\hC56\hC209\or\hfB\hC33\hC54\hC212\or\hfB\hC33\hC54\hC216%
\or\hfB\hC33\hC54\hC217\or\hfB\hC33\hC56\hC218\or\hfB\hC33\hC54\hC219%
\or\hfB\hC33\hC54\hC220\or\hfA\hC63\hC82\or\hfB\hC74\hC101\hC209%
\fi}}

\DeclareRobustCommand{\HanGulY}[1]{%
\KSCode=#1%
\advance\KSCode by-161%
{\ifcase\KSCode%
\hfB\hC74\hC99\hC212\or\hfB\hC74\hC99\hC217\or\hfA\hC112%
\or\hfA\hC220\hC221\hC249\or\hfA\hC220\hC221\hC231\or\hfA\hC220\hC221\hC250%
\or\hfA\hC220\hC221\hC251\or\hfA\hC220\hC221\hC252\or\hfA\hC220\hC221\hC253%
\or\hfA\hC220\hC221\hC254\or\hfA\hC220\hC221\hC242\or\hfA\hC220\hC221\hC255%
\or\hfA\hC157\hC158\or\hfB\hC123\hC124\hC208\or\hfB\hC123\hC126\hC209%
\or\hfB\hC123\hC124\hC212\or\hfB\hC123\hC126\hC218\or\hfB\hC123\hC124\hC220%
\or\hfB\hC235\or\hfB\hC164\hC165\hC208\or\hfB\hC164\hC166\hC209%
\or\hfB\hC164\hC166\hC218\or\hfB\hC164\hC165\hC220\or\hfA\hC157\hC36%
\or\hfB\hC123\hC125\hC208\or\hfB\hC123\hC127\hC209\or\hfB\hC123\hC125\hC212%
\or\hfB\hC123\hC125\hC217\or\hfB\hC123\hC127\hC218\or\hfB\hC123\hC125\hC220%
\or\hfA\hC113\or\hfA\hC220\hC222\hC231\or\hfA\hC220\hC222\hC250%
\or\hfA\hC220\hC222\hC253\or\hfA\hC220\hC222\hC254\or\hfA\hC138%
\or\hfA\hC220\hC223\hC249\or\hfA\hC220\hC225\or\hfA\hC220\hC223\hC250%
\or\hfA\hC220\hC223\hC251\or\hfA\hC220\hC223\hC252\or\hfA\hC220\hC223\hC254%
\or\hfA\hC220\hC223\hC242\or\hfA\hC186\hC187\or\hfB\hC156\hC158\hC209%
\or\hfB\hC156\hC157\hC212\or\hfB\hC156\hC157\hC216\or\hfB\hC156\hC157\hC220%
\or\hfB\hC251\or\hfB\hC178\hC208\or\hfB\hC179%
\or\hfB\hC178\hC212\or\hfB\hC178\hC220\or\hfA\hC186\hC36%
\or\hfB\hC156\hC125\hC208\or\hfB\hC156\hC127\hC209\or\hfB\hC156\hC125\hC212%
\or\hfB\hC156\hC125\hC216\or\hfB\hC156\hC125\hC217\or\hfB\hC156\hC127\hC218%
\or\hfB\hC156\hC125\hC220\or\hfA\hC139\or\hfA\hC220\hC224\hC249%
\or\hfA\hC220\hC226\or\hfA\hC220\hC224\hC250\or\hfA\hC220\hC224\hC252%
\or\hfA\hC220\hC224\hC254\or\hfA\hC220\hC224\hC242\or\hfA\hC114%
\or\hfA\hC220\hC227\hC249\or\hfA\hC220\hC227\hC231\or\hfB\hC253%
\or\hfB\hC254\or\hfA\hC220\hC227\hC250\or\hfB\hC255%
\or\hfA\hC220\hC227\hC252\or\hfA\hC220\hC227\hC253\or\hfA\hC220\hC227\hC254%
\or\hfA\hC220\hC227\hC242\or\hfA\hC220\hC227\hC255\or\hfA\hC167%
\or\hfB\hC134\hC127\hC209\or\hfB\hC134\hC125\hC212\or\hfB\hC134\hC125\hC216%
\or\hfB\hC134\hC125\hC217\or\hfB\hC134\hC125\hC220\or\hfA\hC33\hC36%
\or\hfB\hC33\hC125\hC208\or\hfB\hC33\hC127\hC209\or\hfB\hC33\hC125\hC212%
\or\hfB\hC33\hC125\hC216\or\hfB\hC33\hC125\hC217\or\hfB\hC33\hC127\hC218%
\or\hfB\hC33\hC125\hC220\fi}}%

% Jaso (�����, ����) + Symbol

\def\@bad@hsymbol{%
  \GenericError{%
      \space\space\space\@spaces\@spaces\@spaces
   }{%
      HLaTeX Error: Symbol on line \the\inputlineno \space not available%
   }{%
      See HLaTeX guide for valid input symbols.%
   }{\@ehc}}

\def^^a1#1{\HanSymA{\the\mathcode`#1}}
\def^^a2#1{\HanSymB{\the\mathcode`#1}}
\def^^a3#1{\HanSymC{\the\mathcode`#1}}
\def^^a4#1{\HanSymD{\the\mathcode`#1}}
\def^^a5#1{\@bad@hsymbol}
\def^^a6#1{\@bad@hsymbol}
\def^^a7#1{\@bad@hsymbol}
\def^^a8#1{\HanSymH{\the\mathcode`#1}}
\def^^a9#1{\HanSymI{\the\mathcode`#1}}
\def^^aa#1{\@bad@hsymbol}
\def^^ab#1{\@bad@hsymbol}
\def^^ac#1{\@bad@hsymbol}
\def^^ad#1{\@bad@hsymbol}
\def^^ae#1{\@bad@hsymbol}
\def^^af#1{\@bad@hsymbol}

\DeclareRobustCommand{\HanSymA}[1]{%
\h@N=#1\relax
\ifnum\h@N>177
  \ifnum\h@N<190 \advance\h@N by54
  \else \ifnum\h@N>204
          \ifnum\h@N<208 \advance\h@N by39
          \else \ifnum\h@N=216 \h@N=247
                \else\h@N=\@m\fi
          \fi
        \else\h@N=\@m\fi
  \fi
\else\h@N=\@m\fi
\ifnum\h@N=\@m\@bad@hsymbol
\else{\sm\hC\h@N\H@hyphen}\fi}

\DeclareRobustCommand{\HanSymB}[1]{%
\h@N=#1\relax
\ifnum\h@N=182 \h@N=248
\else \ifnum\h@N>204
        \ifnum\h@N<210 \advance\h@N by44
        \else \ifnum\h@N>221
                \ifnum\h@N<224 \advance\h@N by32
                \else\h@N=\@m\fi
              \else\h@N=\@m\fi
        \fi
      \else\h@N=\@m\fi
\fi
\ifnum\h@N=\@m \@bad@hsymbol
\else{\sm\hC\h@N\H@hyphen}\fi}

\DeclareRobustCommand{\HanSymC}[1]{%
\h@N=#1\relax
\ifnum\h@N=220%
{\sm\hC51\H@hyphen}
\else\@bad@hsymbol\fi}

\DeclareRobustCommand{\HanSymD}[1]{%
\h@N=#1\relax
\advance\h@N by-161%
{\sm\hC\h@N}\H@hyphen}

\DeclareRobustCommand{\HanSymH}[1]{%
\h@N=#1\relax
\ifnum\h@N>176
  \ifnum\h@N<246 \advance\h@N by-83
  \else\h@N=\@m\fi
\else\h@N=\@m\fi
\ifnum\h@N=\@m \@bad@hsymbol
\else{\sm\hC\h@N\H@hyphen}\fi}

\DeclareRobustCommand{\HanSymI}[1]{%
\h@N=#1\relax
\ifnum\h@N>176
  \ifnum\h@N<246 \advance\h@N by-14
  \else\h@N=\@m\fi
\else\h@N=\@m\fi
\ifnum\h@N=\@m \@bad@hsymbol
\else{\sm\hC\h@N\H@hyphen}\fi}

% Hanja (����)

\def\H@J#1{\def#1##1{\HanJa{\the\mathcode`#1}{\the\mathcode`##1}}}

\H@J^^ca \H@J^^cb \H@J^^cc \H@J^^cd \H@J^^ce \H@J^^cf
\H@J^^d0 \H@J^^d1 \H@J^^d2 \H@J^^d3 \H@J^^d4 \H@J^^d5 \H@J^^d6 \H@J^^d7
\H@J^^d8 \H@J^^d9 \H@J^^da \H@J^^db \H@J^^dc \H@J^^dd \H@J^^de \H@J^^df
\H@J^^e0 \H@J^^e1 \H@J^^e2 \H@J^^e3 \H@J^^e4 \H@J^^e5 \H@J^^e6 \H@J^^e7
\H@J^^e8 \H@J^^e9 \H@J^^ea \H@J^^eb \H@J^^ec \H@J^^ed \H@J^^ee \H@J^^ef
\H@J^^f0 \H@J^^f1 \H@J^^f2 \H@J^^f3 \H@J^^f4 \H@J^^f5 \H@J^^f6 \H@J^^f7
\H@J^^f8 \H@J^^f9 \H@J^^fa \H@J^^fb \H@J^^fc \H@J^^fd

\DeclareRobustCommand{\HanJa}[2]{%
\h@N=#1%
\advance\h@N by-202%
\h@@N=#2%
\multiply\h@N by94%
\advance\h@@N by-161%
\advance\h@N by\h@@N%
\h@@N=\h@N%
\divide\h@N by256%
\h@@@N=\h@N%
\multiply\h@@@N by256%
\advance\h@@N by-\h@@@N%
{\csname hf\ifcase\h@N C\or D\or E\or F\or G\or H\or I\or J\or K\or L\or%
M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\fi\endcsname\hC\h@@N%
}\H@hyphen}

%%
%% End of file `hfont.tex'.
