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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.q: F = None
        self.s: G = None
        self.p: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.s: B = None
        self.x: E = None
        self.r: G = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: D = None
        self.o: H = None
        self.p: B = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.q: F = None
        self.s: G = None
        self.p: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.s: B = None
        self.x: E = None
        self.r: G = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: D = None
        self.o: H = None
        self.p: B = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

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

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

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