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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: G = None
        self.s: E = None
        self.o: G = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.y: C = None
        self.s: F = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.u: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

i = A("i")
c = B("c")
l = C("l")
a = D("a")
k = E("k")
d = F("d")
b = G("b")
e = H("e")

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: G = None
        self.s: E = None
        self.o: G = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.y: C = None
        self.s: F = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.u: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

i = A("i")
c = B("c")
l = C("l")
a = D("a")
k = E("k")
d = F("d")
b = G("b")
e = H("e")

i.y = c
c.t = e
c.v = e
c.q = e
c.p = b
c.o = b
c.s = k
l.o = k
l.v = e
l.y = e
l.s = e
l.z = b
l.p = b
l.t = d
l.x = d
a.x = e
a.v = e
a.y = l
a.s = d
a.w = d
a.p = k
k.q = l
k.x = e
d.p = b
d.w = e
d.u = e
d.r = k
b.t = d
b.y = e
b.u = k
b.v = k
b.o = k
b.p = a
e.u = a
e.y = a
e.p = k
e.x = c
assert k.q.p.o.q.t.w.x.q.txt == "e"