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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.r: G = None
        self.y: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: E = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
m = C("m")
j = D("j")
c = E("c")
l = F("l")
h = G("h")
d = H("d")
e = H("e")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.r: G = None
        self.y: G = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: E = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
m = C("m")
j = D("j")
c = E("c")
l = F("l")
h = G("h")
d = H("d")
e = H("e")
k = F("k")

i.r = d
i.u = n
i.p = n
i.y = n
i.w = m
i.s = h
n.v = k
n.t = m
n.r = h
n.y = h
n.q = l
m.p = j
j.o = d
j.x = c
j.z = m
j.u = i
c.s = n
c.p = e
c.x = k
l.p = m
h.o = k
h.z = k
h.t = l
h.v = m
h.p = m
h.r = c
d.r = m
d.p = m
d.v = m
d.s = m
d.w = i
d.x = k
d.y = c
e.r = m
e.p = m
e.v = m
e.s = m
e.w = i
e.x = k
e.y = c
k.p = m
assert n.v.p.p.u.p.y.txt == "h"