use v6; print join ' ', reverse .words for lines.grep(/SRC1/)\ .map({ [+<<.words[*-1, 0], $_]})\ .sort\ .map(*[2])