class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: I = None
        self.t: F = None
        self.u: B = None
        self.x: E = None
        self.w: B = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.s: I = None
        self.r: C = None
        self.u: F = None
        self.v: H = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: I = None
        self.t: F = None
        self.u: B = None
        self.x: E = None
        self.w: B = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.s: I = None
        self.r: C = None
        self.u: F = None
        self.v: H = None
        self.y: A = None
        self.txt = txt

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

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