\documentclass{article}

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

\begin{document}

$\overline{ A+\overline{ \overline{B} }}$,
$\underline{ A+B }$, $\overrightarrow{PQ}$ 

$\overbrace{ a+\ldots+a }$,
$\overbrace{ a+\ldots+a }^n$

$\underbrace{ \overbrace{ a+\ldots+a }^m
              +b+\ldots+b }_{m+n}$

\end{document}
