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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.z: C = None
        self.p: B = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.z: C = None
        self.p: B = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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