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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.y: A = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: H = None
        self.y: D = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.y: A = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: H = None
        self.y: D = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

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

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