class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: B = None
        self.y: D = None
        self.o: D = None
        self.u: C = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: H = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: B = None
        self.y: D = None
        self.o: D = None
        self.u: C = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: H = None
        self.s: H = None
        self.txt = txt

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

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