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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.w: D = None
        self.q: F = None
        self.o: H = None
        self.v: A = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.w: D = None
        self.s: F = None
        self.v: A = None
        self.t: C = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.u: D = None
        self.y: E = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.w: D = None
        self.q: F = None
        self.o: H = None
        self.v: A = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.w: D = None
        self.s: F = None
        self.v: A = None
        self.t: C = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.u: D = None
        self.y: E = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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