ZigZag Conversion by using while + for, worth to write one more time