Back tracking

need to pay attention to the last for in main cuz it search the current word ['a'] word = 'a' this situation