For your first question, note that , that is, is the one point compactification of .

Now

(disjoint union)

First glue we get , then glue by identifying it with the unit disk, then glue it to the frame. It's not easy to express but you can always take m=n=1 as an example to study the procedure to glue (1 square)+(2 segments)+(1 point) together to get a torus.