Let $\mathbb{Z}^+$ denote the set of positive integers. Find all functions $f: \mathbb{Z}^+ \times \mathbb{Z}^+ \rightarrow \mathbb{Z}^+$ such that $f(m,m)=m$ $f(m,k) = f(k,m)$ $f(m, m+k) = f(m,k)$ , for each $m,k \in \mathbb{Z}^+$.
Problem
Source: Turkey TST 1989 - P1
Tags: function, algorithm, number theory proposed, number theory