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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.w: F = None
        self.x: A = None
        self.s: F = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.w: F = None
        self.x: A = None
        self.s: F = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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