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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: C = None
        self.z: E = None
        self.t: D = None
        self.o: C = None
        self.u: E = None
        self.p: I = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: C = None
        self.z: E = None
        self.t: D = None
        self.o: C = None
        self.u: E = None
        self.p: I = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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