An automaton in the nonstationary random environment