class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: J = None
        self.p: B = None
        self.z: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.p: C = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

b = A("b")
k = B("k")
i = C("i")
c = D("c")
m = E("m")
j = F("j")
a = G("a")
d = H("d")
f = I("f")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.p: C = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

b = A("b")
k = B("k")
i = C("i")
c = D("c")
m = E("m")
j = F("j")
a = G("a")
d = H("d")
f = I("f")
n = J("n")

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