print((n=ARGV.shift)?((n=n.to_i)<0?(ARGF.reverse_each.drop(-n).reverse):(ARGF.each_line.drop(n)))*"":"#{$0}\40{line_count}\n");exit((n)?0:1)