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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.u: G = None
        self.y: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.u: G = None
        self.s: D = None
        self.q: B = None
        self.y: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.x: G = None
        self.y: G = None
        self.t: D = None
        self.v: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.u: G = None
        self.y: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.u: G = None
        self.s: D = None
        self.q: B = None
        self.y: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.x: G = None
        self.y: G = None
        self.t: D = None
        self.v: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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