class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: F = None
        self.p: H = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.q: G = None
        self.v: F = None
        self.p: H = None
        self.u: B = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.q: G = None
        self.v: F = None
        self.p: H = None
        self.u: B = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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