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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.q: B = None
        self.o: B = None
        self.u: A = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

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

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

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

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

n.t = h
n.r = l
d.y = h
e.z = b
e.p = d
e.y = h
e.q = h
l.o = h
l.t = h
l.x = e
l.y = b
l.z = b
l.s = k
l.r = f
l.q = c
c.t = d
c.x = d
c.q = d
c.o = d
c.y = d
c.u = n
c.s = a
h.s = c
b.u = d
f.t = l
f.p = l
f.x = l
f.s = n
f.v = h
f.y = a
f.u = d
f.q = d
k.t = h
k.r = l
a.t = l
a.p = l
a.x = l
a.s = k
a.v = h
a.y = f
a.u = d
a.q = d
assert d.y.s.u.r.r.v.s.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.q: B = None
        self.o: B = None
        self.u: A = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

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

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

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

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

n.t = h
n.r = l
d.y = h
e.z = b
e.p = d
e.y = h
e.q = h
l.o = h
l.t = h
l.x = e
l.y = b
l.z = b
l.s = k
l.r = f
l.q = c
c.t = d
c.x = d
c.q = d
c.o = d
c.y = d
c.u = n
c.s = a
h.s = c
b.u = d
f.t = l
f.p = l
f.x = l
f.s = n
f.v = h
f.y = a
f.u = d
f.q = d
k.t = h
k.r = l
a.t = l
a.p = l
a.x = l
a.s = k
a.v = h
a.y = f
a.u = d
a.q = d
assert d.y.s.u.r.r.v.s.t.y.txt == "h"