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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.x: D = None
        self.r: H = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.q: B = None
        self.t: B = None
        self.y: H = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: E = None
        self.x: D = None
        self.r: H = None
        self.q: F = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.q: B = None
        self.t: B = None
        self.y: H = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

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

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

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