let _ = 
  let list_of_string str = 
    let l = String.length str in
    let rec iter i lst =
      if i >= l then lst
      else iter (i + 1) ((int_of_char str.[i] - 48) :: lst) in
    iter 0 [] in
  let add lst1 lst2 = 
    let rec iter rst = function
      | (0, [], []) -> rst
      | (_, [], []) -> 1 :: rst
      | (c, [], hd :: tl) -> iter (((c + hd) mod 10) :: rst) ((c + hd) / 10, [], tl)
      | (c, hd :: tl, []) -> iter (((c + hd) mod 10) :: rst) ((c + hd) / 10, tl, [])
      | (c, hd1 :: tl1, hd2 :: tl2) -> iter (((c + hd1 + hd2) mod 10) :: rst) ((c + hd1 + hd2) / 10, tl1, tl2) in
    iter [] (0, lst1, lst2) in
  let string_of_list lst =
    if List.length lst > 80 then "overflow"
    else List.fold_left (fun s i -> s ^ (string_of_int i)) "" lst in
  let n = Scanf.scanf "%d\n" (fun x -> x) in
  for i = 1 to n do
    let x = Scanf.scanf "%s\n" (fun s -> list_of_string s) in
    let y = Scanf.scanf "%s\n" (fun s -> list_of_string s) in
    Printf.printf "%s\n"  (string_of_list (add x y))
  done