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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: B = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.o: E = None
        self.x: E = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

e = A("e")
j = B("j")
k = C("k")
g = D("g")
a = E("a")
f = F("f")
n = E("n")
i = B("i")
m = F("m")

e.x = a
e.p = a
e.q = j
e.y = j
e.u = k
j.r = i
j.q = i
j.z = n
k.o = f
g.o = e
a.u = n
a.p = k
f.p = j
f.z = j
f.o = a
f.x = a
f.w = k
f.u = e
n.u = a
n.p = k
i.r = j
i.q = j
i.z = a
m.p = j
m.z = j
m.o = n
m.x = n
m.w = k
m.u = e
assert f.u.u.o.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: B = None
        self.y: B = None
        self.p: E = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: B = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.o: E = None
        self.x: E = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

e = A("e")
j = B("j")
k = C("k")
g = D("g")
a = E("a")
f = F("f")
n = E("n")
i = B("i")
m = F("m")

e.x = a
e.p = a
e.q = j
e.y = j
e.u = k
j.r = i
j.q = i
j.z = n
k.o = f
g.o = e
a.u = n
a.p = k
f.p = j
f.z = j
f.o = a
f.x = a
f.w = k
f.u = e
n.u = a
n.p = k
i.r = j
i.q = j
i.z = a
m.p = j
m.z = j
m.o = n
m.x = n
m.w = k
m.u = e
assert f.u.u.o.o.u.txt == "n"