class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: H = None
        self.z: G = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: J = None
        self.r: I = None
        self.t: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: H = None
        self.x: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.y: J = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.w: D = None
        self.t: G = None
        self.y: F = None
        self.o: I = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: J = None
        self.r: I = None
        self.t: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: H = None
        self.x: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.y: J = None
        self.q: E = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.w: D = None
        self.t: G = None
        self.y: F = None
        self.o: I = None
        self.z: C = None
        self.txt = txt

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

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