class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: C = None
        self.y: H = None
        self.x: D = None
        self.z: D = None
        self.s: H = None
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.q: B = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: B = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.q: B = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: B = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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