class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.r: D = None
        self.t: E = None
        self.v: C = None
        self.u: B = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: G = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: F = None
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.z: C = None
        self.r: D = None
        self.q: D = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.w: C = None
        self.s: B = None
        self.t: E = None
        self.v: A = None
        self.r: B = None
        self.o: E = None
        self.txt = txt

i = A("i")
j = B("j")
f = C("f")
h = D("h")
m = E("m")
g = F("g")
b = G("b")
e = H("e")
n = C("n")
l = A("l")

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: G = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: F = None
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.z: C = None
        self.r: D = None
        self.q: D = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.w: C = None
        self.s: B = None
        self.t: E = None
        self.v: A = None
        self.r: B = None
        self.o: E = None
        self.txt = txt

i = A("i")
j = B("j")
f = C("f")
h = D("h")
m = E("m")
g = F("g")
b = G("b")
e = H("e")
n = C("n")
l = A("l")

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