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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.u: F = None
        self.o: D = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: C = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.u: F = None
        self.o: D = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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