class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.r: E = None
        self.x: B = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: H = None
        self.y: H = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: C = None
        self.q: B = None
        self.v: B = None
        self.u: B = None
        self.s: H = None
        self.p: C = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: H = None
        self.y: H = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: C = None
        self.q: B = None
        self.v: B = None
        self.u: B = None
        self.s: H = None
        self.p: C = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.txt = txt

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

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

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