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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.x: I = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: J = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.s: H = None
        self.p: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.x: I = None
        self.w: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: J = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.s: H = None
        self.p: E = None
        self.r: E = None
        self.txt = txt

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

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

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