class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: J = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: J = None
        self.v: I = None
        self.s: J = None
        self.u: I = None
        self.o: G = None
        self.y: D = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.q: B = None
        self.s: A = None
        self.u: E = None
        self.p: E = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: F = None
        self.u: J = None
        self.z: D = None
        self.t: J = None
        self.y: B = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.txt = txt

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

c = A("c")
b = B("b")
h = C("h")
d = D("d")
f = E("f")
i = F("i")
e = G("e")
m = H("m")
k = I("k")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: J = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: J = None
        self.v: I = None
        self.s: J = None
        self.u: I = None
        self.o: G = None
        self.y: D = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.q: B = None
        self.s: A = None
        self.u: E = None
        self.p: E = None
        self.t: G = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: F = None
        self.u: J = None
        self.z: D = None
        self.t: J = None
        self.y: B = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: H = None
        self.txt = txt

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

c = A("c")
b = B("b")
h = C("h")
d = D("d")
f = E("f")
i = F("i")
e = G("e")
m = H("m")
k = I("k")
l = J("l")

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