Here is a starting code for a template to write sheets of exercises.
\documentclass[12pt]{article}
\usepackage{xhfill} % https://tex.stackexchange.com/a/155960/6880
\usepackage[showframe]{geometry}
\begin{document}
START
\setlength{\fboxrule}{0.2ex}
\framebox{Ex.1}\xrfill[0.4ex]{0.25ex}
\end{document}
I would like to add materials above and below the filling rule like in the following picture. How can I achieve this ?


