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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: H = None
        self.s: A = None
        self.x: D = None
        self.w: H = None
        self.v: C = None
        self.o: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

a = A("a")
m = B("m")
n = C("n")
k = D("k")
c = E("c")
h = F("h")
g = G("g")
f = H("f")
e = D("e")
d = B("d")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: H = None
        self.s: A = None
        self.x: D = None
        self.w: H = None
        self.v: C = None
        self.o: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

a = A("a")
m = B("m")
n = C("n")
k = D("k")
c = E("c")
h = F("h")
g = G("g")
f = H("f")
e = D("e")
d = B("d")

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