class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.t: B = None
        self.z: E = None
        self.q: D = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.u: D = None
        self.x: D = None
        self.p: E = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: A = None
        self.s: E = None
        self.u: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.x: D = None
        self.s: F = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

m = A("m")
b = B("b")
e = C("e")
f = D("f")
n = E("n")
k = F("k")
a = G("a")
i = H("i")
j = A("j")
d = D("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.u: D = None
        self.x: D = None
        self.p: E = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: A = None
        self.s: E = None
        self.u: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.x: D = None
        self.s: F = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

m = A("m")
b = B("b")
e = C("e")
f = D("f")
n = E("n")
k = F("k")
a = G("a")
i = H("i")
j = A("j")
d = D("d")

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