class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: I = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.w: A = None
        self.v: D = None
        self.o: A = None
        self.r: I = None
        self.p: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.q: J = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.s: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: G = None
        self.w: A = None
        self.v: D = None
        self.o: A = None
        self.r: I = None
        self.p: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.q: J = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.s: D = None
        self.r: A = None
        self.txt = txt

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

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

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