WOrking code for 7 input and 6 input with one character and 7 input with 2 characters