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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

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

b = A("b")
m = B("m")
a = C("a")
f = D("f")
j = E("j")
h = F("h")
i = G("i")
k = A("k")
c = D("c")
n = G("n")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

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

b = A("b")
m = B("m")
a = C("a")
f = D("f")
j = E("j")
h = F("h")
i = G("i")
k = A("k")
c = D("c")
n = G("n")

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