class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.x: I = None
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: J = None
        self.u: C = None
        self.t: A = None
        self.z: H = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.p: B = None
        self.x: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: I = None
        self.p: J = None
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: D = None
        self.r: B = None
        self.z: E = None
        self.x: H = None
        self.txt = txt

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

l = A("l")
c = B("c")
h = C("h")
i = D("i")
n = E("n")
g = F("g")
f = G("f")
b = H("b")
j = I("j")
d = J("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: J = None
        self.u: C = None
        self.t: A = None
        self.z: H = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.p: B = None
        self.x: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: I = None
        self.p: J = None
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: D = None
        self.r: B = None
        self.z: E = None
        self.x: H = None
        self.txt = txt

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

l = A("l")
c = B("c")
h = C("h")
i = D("i")
n = E("n")
g = F("g")
f = G("f")
b = H("b")
j = I("j")
d = J("d")

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