has_next()){ while($this->has_next()){ $ret .= $this->next(); } }else{ $ret = trim(fgets(STDIN)); } return $ret; } public function next() { if(!$this->has_next()) { $str = trim(fgets(STDIN)); $this->arr = explode(' ',$str); $this->count = count($this->arr); $this->pointer = 0; } $result = $this->arr[$this->pointer]; $this->pointer++; return $result; } public function has_next() { return $this->pointer < $this->count; } public function next_int() { return (int)$this->next(); } public function next_double() { return (double)$this->next(); } } class Out { public static function println($str = "") { echo $str . PHP_EOL; } } $in = new In(); $N = $in->next_int(); for($i = 0;$i < $N;$i++) { $S[] = $in->next(); } for($i = 0;$i < $N;$i++) { $T[] = $in->next(); } for($i = 0;$i < $N;$i++) { if($S[$i] !== $T[$i]) { Out::println($i + 1); Out::println($S[$i]); Out::println($T[$i]); } } ?>