oprava u8

This commit is contained in:
Martin Škovran 2026-11-03 14:13:27 +01:00
parent f08b7b7c28
commit 6a2446618a

View File

@ -1,3 +1,6 @@
import sys
class Node:
def __init__(self, text):
self.text = text
@ -9,11 +12,17 @@ class Node:
def read_line():
try:
return input()
except EOFError:
line = sys.stdin.readline()
if line == "":
return None
if line.endswith("\n"):
line = line[:-1]
if line.endswith("\r"):
line = line[:-1]
return line
class Tree:
def __init__(self):