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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: C = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.p: A = None
        self.z: B = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: H = None
        self.w: A = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: E = None
        self.z: C = None
        self.w: G = None
        self.s: E = None
        self.p: G = None
        self.u: E = None
        self.txt = txt

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

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

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

e.r = f
e.w = k
f.p = a
f.u = l
f.x = g
f.s = g
l.v = c
l.t = n
l.p = e
l.z = f
l.x = a
k.z = e
k.t = e
k.v = j
n.x = k
n.s = a
n.w = e
n.t = l
n.p = l
d.q = a
d.t = n
d.s = n
d.u = n
d.z = l
d.w = c
d.p = c
c.s = l
j.v = a
j.t = a
j.s = d
j.p = n
j.x = n
j.r = l
j.u = e
j.q = k
g.p = j
g.u = l
g.x = f
g.s = f
a.v = j
a.t = j
a.s = d
a.p = n
a.x = n
a.r = l
a.u = e
a.q = k
assert n.s.r.p.r.u.v.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: C = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.p: A = None
        self.z: B = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: H = None
        self.w: A = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: E = None
        self.z: C = None
        self.w: G = None
        self.s: E = None
        self.p: G = None
        self.u: E = None
        self.txt = txt

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

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

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

e.r = f
e.w = k
f.p = a
f.u = l
f.x = g
f.s = g
l.v = c
l.t = n
l.p = e
l.z = f
l.x = a
k.z = e
k.t = e
k.v = j
n.x = k
n.s = a
n.w = e
n.t = l
n.p = l
d.q = a
d.t = n
d.s = n
d.u = n
d.z = l
d.w = c
d.p = c
c.s = l
j.v = a
j.t = a
j.s = d
j.p = n
j.x = n
j.r = l
j.u = e
j.q = k
g.p = j
g.u = l
g.x = f
g.s = f
a.v = j
a.t = j
a.s = d
a.p = n
a.x = n
a.r = l
a.u = e
a.q = k
assert n.s.r.p.r.u.v.s.p.txt == "e"