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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.r: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.p: E = None
        self.o: A = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.t: A = None
        self.u: D = None
        self.p: F = None
        self.txt = txt

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

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

i = A("i")
g = B("g")
j = C("j")
e = D("e")
b = E("b")
l = F("l")
d = G("d")
a = G("a")
c = D("c")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.r: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.p: E = None
        self.o: A = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.t: A = None
        self.u: D = None
        self.p: F = None
        self.txt = txt

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

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

i = A("i")
g = B("g")
j = C("j")
e = D("e")
b = E("b")
l = F("l")
d = G("d")
a = G("a")
c = D("c")
m = D("m")

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