Реализация loop и as