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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.x: F = None
        self.p: A = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.x: F = None
        self.p: A = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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