foreach a\ b [read stdin] {set n 0;set s "";while {[incr n]<8} {set s $s$a\ ;set c $b$a;set a $b;set b $c};puts $s$a}