Hints: Cross Lines

Getting started:
As the flavortext suggests, we need to identify the country flags the stripes come from. For example, the first vertical line corresponds to the flag of Western Sahara.
Stuck with the boxes:
The flavor text suggests to use the 3-letter ISO country abbreviations to fill out the boxes.
Stuck on extraction:
Can you “identify” the gray stripes using the same mechanism, and thus fill out the middle letter on each image?