v 1.0 :
working input: 1223
bad input: 122