class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.r: I = None
        self.p: E = None
        self.y: E = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.t: B = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.o: A = None
        self.z: G = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: E = None
        self.p: C = None
        self.x: B = None
        self.u: B = None
        self.s: B = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.t: B = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.o: A = None
        self.z: G = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: E = None
        self.p: C = None
        self.x: B = None
        self.u: B = None
        self.s: B = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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