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

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

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

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

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

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

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

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

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

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

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

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

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

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

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