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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: D = None
        self.r: H = None
        self.txt = txt

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

e = A("e")
n = B("n")
d = C("d")
k = D("k")
l = E("l")
m = F("m")
g = G("g")
f = H("f")
h = F("h")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: D = None
        self.r: H = None
        self.txt = txt

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

e = A("e")
n = B("n")
d = C("d")
k = D("k")
l = E("l")
m = F("m")
g = G("g")
f = H("f")
h = F("h")

e.y = d
e.r = m
e.w = m
e.o = g
e.u = l
e.s = l
e.v = h
e.p = n
n.q = g
n.z = g
n.p = d
d.t = l
d.y = m
d.v = k
k.y = n
k.q = e
k.v = h
l.p = g
l.o = k
m.p = g
m.z = e
m.r = e
g.t = l
g.p = k
g.r = f
f.o = g
f.v = l
f.z = d
f.y = e
f.p = n
h.p = g
h.z = e
h.r = e
assert n.p.v.y.p.t.p.r.z.v.txt == "k"