class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: D = None
        self.w: D = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.s: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.s: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.txt = txt

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

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

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

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