class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.p: I = None
        self.y: F = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.t: C = None
        self.z: B = None
        self.s: H = None
        self.p: C = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: A = None
        self.t: I = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.t: C = None
        self.z: B = None
        self.s: H = None
        self.p: C = None
        self.q: C = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: A = None
        self.t: I = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

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

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