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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.o: H = None
        self.z: F = None
        self.x: H = None
        self.w: A = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.t: C = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.o: H = None
        self.z: F = None
        self.x: H = None
        self.w: A = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.t: C = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

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

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