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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.u: I = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: E = None
        self.r: D = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: H = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.u: I = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: E = None
        self.r: D = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: H = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

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

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

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