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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.o: D = None
        self.s: A = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.t: I = None
        self.z: B = None
        self.q: B = None
        self.s: A = None
        self.w: C = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: J = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.o: D = None
        self.s: A = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.t: I = None
        self.z: B = None
        self.q: B = None
        self.s: A = None
        self.w: C = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: J = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

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

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