#!/usr/bin/perl
use 5.010;

say$_,"."x(!/[1-57]|0$/&&reverse!=y/96/69/r)for 0..<>