class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

i = A("i")
k = B("k")
f = C("f")
c = C("c")
e = A("e")
n = A("n")
b = B("b")
d = C("d")
j = C("j")

i.o = n
i.t = n
i.x = e
k.z = i
k.u = b
f.v = i
c.v = i
e.o = i
e.x = i
e.t = i
n.o = e
n.x = e
n.t = i
b.z = i
b.u = k
d.v = e
j.v = n
assert j.v.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

i = A("i")
k = B("k")
f = C("f")
c = C("c")
e = A("e")
n = A("n")
b = B("b")
d = C("d")
j = C("j")

i.o = n
i.t = n
i.x = e
k.z = i
k.u = b
f.v = i
c.v = i
e.o = i
e.x = i
e.t = i
n.o = e
n.x = e
n.t = i
b.z = i
b.u = k
d.v = e
j.v = n
assert j.v.o.o.o.txt == "n"