class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.s: G = None
        self.z: J = None
        self.r: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: I = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.y: B = None
        self.r: F = None
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: I = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: C = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.y: B = None
        self.r: F = None
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

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