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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.p: I = None
        self.w: F = None
        self.z: F = None
        self.u: D = None
        self.o: A = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.u: G = None
        self.v: H = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.q: H = None
        self.z: D = None
        self.y: E = None
        self.p: H = 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.w: G = None
        self.p: A = None
        self.o: G = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.p: I = None
        self.w: F = None
        self.z: F = None
        self.u: D = None
        self.o: A = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: G = None
        self.u: G = None
        self.v: H = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: B = None
        self.q: H = None
        self.z: D = None
        self.y: E = None
        self.p: H = 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.w: G = None
        self.p: A = None
        self.o: G = None
        self.y: F = None
        self.txt = txt

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

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

b.q = k
b.u = e
b.r = l
b.z = h
k.s = e
k.p = e
k.r = j
k.w = l
k.z = l
k.u = a
k.o = b
k.v = m
k.y = m
h.y = a
h.r = b
a.y = e
a.s = m
a.u = m
a.v = f
a.t = k
j.u = m
j.t = m
j.v = k
j.p = b
j.s = b
j.o = e
l.v = m
l.o = k
l.q = f
l.p = f
l.z = a
l.y = j
m.t = k
f.w = m
f.o = m
f.p = b
f.y = l
e.q = h
e.o = h
e.u = k
e.t = k
e.y = f
assert l.v.t.o.z.txt == "h"