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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.z: D = None
        self.s: E = None
        self.w: A = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: F = None
        self.s: F = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.t: B = None
        self.r: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.z: D = None
        self.s: E = None
        self.w: A = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: F = None
        self.s: F = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.t: B = None
        self.r: C = None
        self.z: E = None
        self.txt = txt

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

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

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