StringBuilder read
while str = input.readline()
  read.append(str)
for i = 0 to read.length()
  if read.charAt(i) == '<'
    // process tag
StringBuilder read
while str = input.readline()
  read.append(str)
  for i = 0 to read.length()
    if read.charAt(i) == '<'
      // process tag
      read.setCharAt(i) = ' '