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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.txt = txt

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

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