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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.x: H = None
        self.s: F = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: G = None
        self.t: D = None
        self.r: F = None
        self.q: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

e = A("e")
i = B("i")
c = C("c")
n = D("n")
m = E("m")
b = F("b")
k = G("k")
a = H("a")
j = F("j")
g = G("g")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.x: H = None
        self.s: F = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: G = None
        self.t: D = None
        self.r: F = None
        self.q: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

e = A("e")
i = B("i")
c = C("c")
n = D("n")
m = E("m")
b = F("b")
k = G("k")
a = H("a")
j = F("j")
g = G("g")

e.s = n
i.p = j
i.t = c
i.x = a
i.s = b
i.y = n
i.r = n
c.u = j
c.r = j
c.o = j
c.s = k
c.t = n
c.q = i
n.q = e
n.p = e
n.s = i
n.w = a
m.o = e
b.u = e
b.s = i
b.v = c
b.o = k
k.s = n
a.u = m
a.s = c
a.t = c
a.x = b
a.v = n
j.u = e
j.s = i
j.v = c
j.o = k
g.s = n
assert e.s.w.s.u.s.t.q.p.s.x.txt == "a"