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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.s: B = None
        self.o: D = None
        self.w: G = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: E = None
        self.z: C = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: G = None
        self.s: B = None
        self.o: D = None
        self.w: G = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: E = None
        self.z: C = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

a.w = d
a.p = n
a.r = m
m.u = a
m.r = j
m.w = j
m.s = b
m.x = b
m.o = d
m.v = n
n.z = m
n.x = a
d.t = a
d.s = n
d.p = l
d.q = g
l.o = m
l.x = a
g.r = a
g.o = l
g.p = d
h.w = n
h.z = n
h.u = n
h.t = l
h.x = a
b.u = a
b.r = h
b.s = m
b.x = m
b.o = d
b.w = j
b.v = n
j.w = n
j.z = n
j.u = n
j.t = l
j.x = a
e.w = n
e.z = n
e.u = n
e.t = l
e.x = a
assert a.w.t.r.v.txt == "n"