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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: J = None
        self.y: B = None
        self.t: A = None
        self.p: A = None
        self.r: J = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: C = None
        self.q: I = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: C = None
        self.z: C = None
        self.q: J = None
        self.w: D = None
        self.x: A = None
        self.s: B = None
        self.t: F = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: I = None
        self.w: I = None
        self.x: D = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: J = None
        self.y: B = None
        self.t: A = None
        self.p: A = None
        self.r: J = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: C = None
        self.q: I = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: C = None
        self.z: C = None
        self.q: J = None
        self.w: D = None
        self.x: A = None
        self.s: B = None
        self.t: F = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: I = None
        self.w: I = None
        self.x: D = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

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

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