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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.r: F = None
        self.v: D = None
        self.z: A = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: C = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.x: C = None
        self.y: G = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.r: F = None
        self.v: D = None
        self.z: A = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: C = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.x: C = None
        self.y: G = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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