class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: I = None
        self.x: C = None
        self.u: J = None
        self.y: I = None
        self.r: H = None
        self.o: I = None
        self.s: E = None
        self.p: C = None
        self.v: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.o: G = None
        self.w: A = None
        self.y: D = None
        self.v: A = None
        self.t: J = None
        self.r: J = None
        self.u: F = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.q: J = None
        self.y: H = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: F = None
        self.t: A = None
        self.z: C = None
        self.p: I = None
        self.w: J = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: H = None
        self.u: E = None
        self.y: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.v: E = None
        self.s: G = None
        self.o: E = None
        self.y: F = None
        self.t: C = None
        self.u: C = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

d = A("d")
k = B("k")
i = C("i")
j = D("j")
m = E("m")
l = F("l")
g = G("g")
f = H("f")
n = I("n")
e = J("e")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.o: G = None
        self.w: A = None
        self.y: D = None
        self.v: A = None
        self.t: J = None
        self.r: J = None
        self.u: F = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: B = None
        self.q: J = None
        self.y: H = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: F = None
        self.t: A = None
        self.z: C = None
        self.p: I = None
        self.w: J = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: H = None
        self.u: E = None
        self.y: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.v: E = None
        self.s: G = None
        self.o: E = None
        self.y: F = None
        self.t: C = None
        self.u: C = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

d = A("d")
k = B("k")
i = C("i")
j = D("j")
m = E("m")
l = F("l")
g = G("g")
f = H("f")
n = I("n")
e = J("e")

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