#!/usr/bin/ruby

def hello()
  puts "Hello World!"
end

def liquid()
  time_in_millis = gettime()
  h = getheight()
  limit = (time_in_millis / 10) % (h*2)
  if limit > h
    limit = 2*h - limit
  end

  i = 0
  while i < limit
    copyline(i, i)
    i = i+1
  end
  while i < h
    copyline(limit, i)
    i = i+1
  end
end

liquid()
