class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.p: E = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.u: A = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.q: E = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.txt = txt

n = A("n")
e = B("e")
j = C("j")
k = D("k")
b = E("b")
l = F("l")
m = D("m")
d = E("d")
f = D("f")

n.t = l
n.q = j
e.t = n
e.q = n
e.p = d
e.x = d
e.u = l
j.r = e
k.t = n
k.u = n
k.z = n
k.w = n
k.o = l
b.s = e
b.u = e
b.v = e
b.x = n
b.q = d
l.w = k
l.z = d
m.t = n
m.u = n
m.z = n
m.w = n
m.o = l
d.s = e
d.u = e
d.v = e
d.x = n
d.q = b
f.t = n
f.u = n
f.z = n
f.w = n
f.o = l
assert f.o.z.u.t.t.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.p: E = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.u: A = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.q: E = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.txt = txt

n = A("n")
e = B("e")
j = C("j")
k = D("k")
b = E("b")
l = F("l")
m = D("m")
d = E("d")
f = D("f")

n.t = l
n.q = j
e.t = n
e.q = n
e.p = d
e.x = d
e.u = l
j.r = e
k.t = n
k.u = n
k.z = n
k.w = n
k.o = l
b.s = e
b.u = e
b.v = e
b.x = n
b.q = d
l.w = k
l.z = d
m.t = n
m.u = n
m.z = n
m.w = n
m.o = l
d.s = e
d.u = e
d.v = e
d.x = n
d.q = b
f.t = n
f.u = n
f.z = n
f.w = n
f.o = l
assert f.o.z.u.t.t.w.u.txt == "n"