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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: E = None
        self.v: D = None
        self.z: A = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: A = None
        self.s: C = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

m = A("m")
f = B("f")
d = C("d")
j = D("j")
c = E("c")
l = F("l")
h = G("h")
g = F("g")
k = G("k")
e = G("e")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: E = None
        self.v: D = None
        self.z: A = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: A = None
        self.s: C = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

m = A("m")
f = B("f")
d = C("d")
j = D("j")
c = E("c")
l = F("l")
h = G("h")
g = F("g")
k = G("k")
e = G("e")

m.v = c
f.o = e
f.w = j
f.v = d
d.x = j
d.t = j
d.v = m
d.w = f
d.s = c
d.o = h
j.w = c
c.y = d
c.r = g
c.s = m
l.s = g
l.r = g
l.o = c
l.v = j
l.z = m
l.q = k
h.u = f
h.y = f
h.w = m
h.s = d
h.q = j
g.s = l
g.r = l
g.o = c
g.v = j
g.z = m
g.q = h
k.u = f
k.y = f
k.w = m
k.s = d
k.q = j
e.u = f
e.y = f
e.w = m
e.s = d
e.q = j
assert d.v.v.s.txt == "m"