Functions $g$ and $h$ are defined on $n$ constants, $a_0,a_1,a_2,a_3,...a_{n−1}$, as follows: $g(a_p,a_q)=a\mid p−q\mid$, if $\mid p-q \mid\leq(n-4) =a_n−\mid p−q\mid$, if $\mid p-q\mid>(n-4) h (a_p,a_q)=a_k$, where $k$ is the remainder when $p+q$ is divided by $n$.
If $h(a_k,a_m)=a_m$ for all $m$, where $1\leq m < n$ and $0 \leq k < n$, and $m$ is a natural number, find $k$.
- $0$
- $1$
- $n-1$
- $n-2$