class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: I = None
        self.v: J = None
        self.x: J = None
        self.s: H = None
        self.q: G = None
        self.r: D = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: G = None
        self.s: B = None
        self.o: J = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.q: H = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.p: E = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: D = None
        self.y: I = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: I = None
        self.v: J = None
        self.x: J = None
        self.s: H = None
        self.q: G = None
        self.r: D = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: G = None
        self.s: B = None
        self.o: J = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.q: H = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.p: E = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: D = None
        self.y: I = None
        self.q: H = None
        self.txt = txt

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

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