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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: D = None
        self.s: J = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.o: C = None
        self.q: J = None
        self.s: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

l.s = g
l.q = g
l.v = g
l.w = a
l.r = n
l.t = c
l.o = i
i.q = c
i.t = g
i.o = f
i.z = n
i.x = l
i.s = h
i.p = e
i.y = a
i.v = a
e.r = c
e.o = c
e.v = a
e.s = g
a.s = e
a.r = j
j.v = f
j.u = c
j.o = e
j.q = g
j.s = g
f.x = a
f.q = l
f.v = l
f.t = g
f.o = g
f.y = h
f.u = h
f.z = e
c.y = i
c.p = j
h.s = l
n.v = a
n.q = i
g.r = a
g.u = a
g.v = e
g.x = e
g.q = h
g.s = h
g.o = j
g.w = n
g.z = i
assert c.p.s.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: D = None
        self.q: J = None
        self.r: I = None
        self.t: G = None
        self.o: B = None
        self.v: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: D = None
        self.s: J = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.o: C = None
        self.q: J = None
        self.s: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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