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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: A = None
        self.t: B = None
        self.txt = txt

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

i.o = h
i.q = h
i.u = n
i.z = c
i.t = e
h.x = c
h.o = c
h.u = n
h.v = n
h.s = b
h.z = e
h.t = i
h.y = d
m.r = h
m.t = d
e.y = h
e.p = j
c.y = e
c.u = j
j.y = i
j.s = h
n.o = d
n.z = a
d.v = j
d.s = i
d.t = h
a.r = h
a.t = d
b.r = h
b.t = d
assert n.o.s.u.z.r.t.t.txt == "e"