class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: H = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.p: H = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.w: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: B = None
        self.t: D = None
        self.v: D = None
        self.u: B = None
        self.o: E = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.p: H = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.w: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: B = None
        self.t: D = None
        self.v: D = None
        self.u: B = None
        self.o: E = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

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

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

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