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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.w: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: J = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.w: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: J = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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