Showing the gcd of Integers can be Distributed

The Question: Use the theorem on classification of subgroups of $\mathbb{Z}$ to prove that, if $a_1,...,a_n \in \mathbb{Z}, gcd(a_1,...,a_n) = gcd(gcd(a_1,...,a_k),gcd(a_{k+1},...,a_n))$ for any $1 \le k \le n.$ The theorem, I believe, is that all integer subsets are multiples of the integers, then again aren't the modulo also subgroups? Also, I feel like I need to use Euclid's Algorithm, but I'm not sure where to start.

I'm guessing here as to how they intended you to solve this. Here is first some background on the structure of the subgroups of $\mathbb Z$ that I guess you should know.
Since $\mathbb Z$ is cyclic its subgroups are precisely the groups $n\cdot \mathbb Z$, for $n=0,1,2,3,\cdots$ (and no, the groups $\mathbb Z_n=\mathbb Z/n\cdot \mathbb Z$ are not subgroups of $\mathbb Z$, rather they are quotient groups of it). The in the lattice of subgroups of $\mathbb Z$, the intersection (i.e., meet) of $n_1\cdot \mathbb Z,\cdots n_k\cdot \mathbb Z$ is ${\rm lcm}(n_1,\cdots ,n_k)$ while the join (i.e., the smallest subgroup containing each $n_i\cdot \mathbb Z$) is ${\rm gcd}(n_1,\cdots,n_k)\cdot \mathbb Z$. So, you can now translate the claim bout the greatest common divisor to a property of joins in a lattice (namely, the a join of joins of things is the join of all the things - formalize this!). That lattice theoretic fact is quite easy to prove.