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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: G = None
        self.p: A = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.p: I = None
        self.y: H = None
        self.o: C = None
        self.u: E = None
        self.v: E = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: G = None
        self.p: A = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.p: I = None
        self.y: H = None
        self.o: C = None
        self.u: E = None
        self.v: E = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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