a='| |' gets;gets;gets t=gets if t[/p/] 13.times{puts '| |'} puts '+------+' puts '19 chains' elsif t[/y/] 5.times{puts '| |'} puts '| r|' puts '| b|' puts '|g b|' puts '|ybgrbg|' puts '|yrrbgg|' puts '|rgbgyy|' puts '|brbgyr|' puts '|gbyyrb|' puts '+------+' puts '2 chains' elsif t[/g/] 11.times{puts '| |'} puts '|y |' puts '|b yyg|' puts '+------+' puts '9 chains' end