\documentclass{article}

\usepackage[latin2]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[magyar]{babel}

\begin{document}

M.~S.~mester, 9~cm, IV.~Béla, Arany~J.

\end{document}
