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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.r: C = None
        self.q: C = None
        self.o: D = None
        self.p: D = None
        self.y: E = None
        self.txt = txt

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

d = A("d")
i = B("i")
a = C("a")
n = D("n")
e = E("e")
f = F("f")
m = G("m")
j = D("j")
b = D("b")

d.s = j
d.y = a
i.q = d
a.u = f
a.r = f
a.o = m
a.t = m
a.p = e
a.y = d
n.z = f
n.w = a
n.v = e
n.y = e
n.u = m
n.o = i
n.x = i
e.u = i
f.v = d
f.w = d
f.r = a
f.q = a
f.o = n
f.p = j
f.y = e
m.z = a
j.z = f
j.w = a
j.v = e
j.y = e
j.u = m
j.o = i
j.x = i
b.z = f
b.w = a
b.v = e
b.y = e
b.u = m
b.o = i
b.x = i
assert d.s.u.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.r: C = None
        self.q: C = None
        self.o: D = None
        self.p: D = None
        self.y: E = None
        self.txt = txt

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

d = A("d")
i = B("i")
a = C("a")
n = D("n")
e = E("e")
f = F("f")
m = G("m")
j = D("j")
b = D("b")

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