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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: E = None
        self.v: G = None
        self.p: B = None
        self.y: E = None
        self.x: B = None
        self.q: A = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: E = None
        self.v: G = None
        self.p: B = None
        self.y: E = None
        self.x: B = None
        self.q: A = None
        self.t: C = None
        self.txt = txt

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

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