import time


def print_slow(str):
  for char in str:
    print(char, end='', flush=True)
    time.sleep(0.05)
  print()


home = '\033[H'
clear = '\033[2J'

for escape in [clear + home, home]:
  print(clear + home, end='')
  print_slow('::::::::::::::::::::')
  print_slow('::::::::::::::::::::')
  print_slow('::: first frame ::::')
  print_slow('::::::::::::::::::::')
  print_slow('::::::::::::::::::::')
  print(escape, end='')
  print_slow('%%%%%%%%%%%%%%%%%%%%')
  print_slow('%%%%%%%%%%%%%%%%%%%%')
  print_slow('%%% second frame %%%')
  print_slow('%%%%%%%%%%%%%%%%%%%%')
  print_slow('%%%%%%%%%%%%%%%%%%%%')
  time.sleep(1)
