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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: A = None
        self.z: D = None
        self.y: B = None
        self.p: B = None
        self.q: A = None
        self.t: E = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.x: I = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.u: I = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

e = A("e")
b = B("b")
k = C("k")
h = D("h")
l = E("l")
g = F("g")
n = G("n")
j = H("j")
c = I("c")
f = G("f")

e.q = b
e.w = b
b.y = c
b.o = k
b.u = k
k.o = b
k.y = b
k.p = b
k.r = e
k.q = e
k.z = h
k.t = l
k.x = c
h.s = f
h.x = c
h.u = b
l.q = h
l.u = k
l.x = c
l.w = e
g.q = b
n.q = g
n.y = l
n.u = c
n.w = b
j.o = g
j.q = k
c.x = f
f.q = g
f.y = l
f.u = c
f.w = b
assert j.o.q.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: A = None
        self.z: D = None
        self.y: B = None
        self.p: B = None
        self.q: A = None
        self.t: E = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.x: I = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.u: I = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

e = A("e")
b = B("b")
k = C("k")
h = D("h")
l = E("l")
g = F("g")
n = G("n")
j = H("j")
c = I("c")
f = G("f")

e.q = b
e.w = b
b.y = c
b.o = k
b.u = k
k.o = b
k.y = b
k.p = b
k.r = e
k.q = e
k.z = h
k.t = l
k.x = c
h.s = f
h.x = c
h.u = b
l.q = h
l.u = k
l.x = c
l.w = e
g.q = b
n.q = g
n.y = l
n.u = c
n.w = b
j.o = g
j.q = k
c.x = f
f.q = g
f.y = l
f.u = c
f.w = b
assert j.o.q.o.z.txt == "h"