The bisector of angle $A$ in parallelogram $ABCD$ intersects side $BC$ at $M$ and the bisector of $\angle AMC$ passes through point $D$. Find angles of the parallelogram if it is known that  $\angle MDC = 45^o$.
[img]https://cdn.artofproblemsolving.com/attachments/e/7/7cfb22f0c26fe39aa3da3898e181ae013a0586.png[/img]
1. **Identify the given information and set up the problem:**
   - We have a parallelogram \(ABCD\).
   - The bisector of \(\angle A\) intersects side \(BC\) at \(M\).
   - The bisector of \(\angle AMC\) passes through point \(D\).
   - \(\angle MDC = 45^\circ\).

2. **Define the angles:**
   - Let \(\angle BAM = \theta\). Since \(M\) is on the angle bisector of \(\angle A\), we have \(\angle DAM = \theta\).
   - In a parallelogram, opposite angles are equal, so \(\angle A = \angle C\) and \(\angle B = \angle D\).

3. **Determine \(\angle AMC\):**
   - Since \(M\) is on the angle bisector of \(\angle A\), \(\angle BAM = \angle DAM = \theta\).
   - Therefore, \(\angle BAC = 2\theta\).
   - Since \(M\) is on the angle bisector of \(\angle AMC\), \(\angle AMC = 180^\circ - 2\theta\).

4. **Use the given \(\angle MDC = 45^\circ\):**
   - Since \(D\) lies on the bisector of \(\angle AMC\), \(\angle AMD = \angle DMC = \frac{180^\circ - 2\theta}{2} = 90^\circ - \theta\).
   - Given \(\angle MDC = 45^\circ\), we have:
     \[
     \angle AMD + \angle MDC = 135^\circ - 2\theta + 45^\circ = 180^\circ - 2\theta
     \]
     \[
     45^\circ + \theta = 90^\circ - \theta
     \]
     \[
     2\theta = 45^\circ
     \]
     \[
     \theta = 22.5^\circ
     \]

5. **Determine the angles of the parallelogram:**
   - Since \(\theta = 22.5^\circ\), \(\angle A = 2\theta = 45^\circ\).
   - In a parallelogram, opposite angles are equal, so \(\angle C = 45^\circ\).
   - The sum of the angles in a parallelogram is \(360^\circ\), so:
     \[
     2\angle A + 2\angle B = 360^\circ
     \]
     \[
     2(45^\circ) + 2\angle B = 360^\circ
     \]
     \[
     90^\circ + 2\angle B = 360^\circ
     \]
     \[
     2\angle B = 270^\circ
     \]
     \[
     \angle B = 135^\circ
     \]
   - Therefore, \(\angle D = 135^\circ\).

The final answer is \(\boxed{45^\circ \text{ and } 135^\circ}\).