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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.v: F = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.v: H = None
        self.q: A = None
        self.s: B = None
        self.p: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.w: A = None
        self.v: D = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.v: F = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.v: H = None
        self.q: A = None
        self.s: B = None
        self.p: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.w: A = None
        self.v: D = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

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

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