class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: E = None
        self.r: C = None
        self.y: G = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: D = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

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

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

m = A("m")
j = B("j")
d = C("d")
g = D("g")
i = E("i")
n = F("n")
c = G("c")
k = F("k")
f = C("f")
e = D("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: D = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

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

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

m = A("m")
j = B("j")
d = C("d")
g = D("g")
i = E("i")
n = F("n")
c = G("c")
k = F("k")
f = C("f")
e = D("e")

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