class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: H = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: F = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.x: C = None
        self.u: G = None
        self.p: B = None
        self.t: J = None
        self.o: B = None
        self.r: H = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.t: G = None
        self.p: C = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: H = None
        self.v: A = None
        self.u: H = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.w: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: F = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: H = None
        self.x: C = None
        self.u: G = None
        self.p: B = None
        self.t: J = None
        self.o: B = None
        self.r: H = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.t: G = None
        self.p: C = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: H = None
        self.v: A = None
        self.u: H = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.w: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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