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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: G = None
        self.p: F = None
        self.y: J = None
        self.v: D = None
        self.x: E = None
        self.r: J = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: I = None
        self.u: J = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: I = None
        self.v: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.r: G = None
        self.s: G = None
        self.q: J = None
        self.x: B = None
        self.t: A = None
        self.w: C = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: H = None
        self.v: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: D = None
        self.p: E = None
        self.t: I = None
        self.y: A = None
        self.w: B = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: G = None
        self.p: F = None
        self.y: J = None
        self.v: D = None
        self.x: E = None
        self.r: J = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: I = None
        self.u: J = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: I = None
        self.v: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.r: G = None
        self.s: G = None
        self.q: J = None
        self.x: B = None
        self.t: A = None
        self.w: C = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: H = None
        self.v: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: D = None
        self.p: E = None
        self.t: I = None
        self.y: A = None
        self.w: B = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

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

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