<?php
echo implode(' & ', array_map(function($v) use ($argv) {
    return "\\includegraphics[height=1.7cm]{out/{$argv[1]}_{$v}.jpg}";
}, ['damaged', 1, 2, 4, 8, 16, 32, 64, 128, 200, 'ok']))." \\\\ ";