#!/usr/bin/perl -a
use 5.10.0;
for(@F){$_%2?last:push@a,$_}say"@a" 