class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.z: D = None
        self.o: A = None
        self.y: D = None
        self.t: C = None
        self.r: E = None
        self.u: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: G = None
        self.o: A = None
        self.t: F = None
        self.z: D = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.z: D = None
        self.o: A = None
        self.y: D = None
        self.t: C = None
        self.r: E = None
        self.u: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: G = None
        self.o: A = None
        self.t: F = None
        self.z: D = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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