class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.p: G = None
        self.q: H = None
        self.r: B = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.u: C = None
        self.y: H = None
        self.v: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.s: D = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

b.o = l
b.q = l
b.t = e
b.p = n
b.r = m
b.u = a
m.r = d
m.s = a
m.u = g
m.v = g
m.y = l
m.x = c
g.q = e
c.y = e
c.p = m
c.u = n
c.v = a
c.x = l
d.v = m
d.s = l
d.x = n
d.q = c
d.o = g
d.u = b
a.s = g
a.q = g
n.o = a
n.p = l
n.s = c
n.q = b
n.r = b
l.y = c
l.z = c
l.o = a
l.v = a
e.y = c
assert g.q.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.p: G = None
        self.q: H = None
        self.r: B = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.u: C = None
        self.y: H = None
        self.v: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.s: D = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

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

b.o = l
b.q = l
b.t = e
b.p = n
b.r = m
b.u = a
m.r = d
m.s = a
m.u = g
m.v = g
m.y = l
m.x = c
g.q = e
c.y = e
c.p = m
c.u = n
c.v = a
c.x = l
d.v = m
d.s = l
d.x = n
d.q = c
d.o = g
d.u = b
a.s = g
a.q = g
n.o = a
n.p = l
n.s = c
n.q = b
n.r = b
l.y = c
l.z = c
l.o = a
l.v = a
e.y = c
assert g.q.y.v.txt == "a"