class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.r: F = None
        self.o: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.x: C = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.x: C = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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