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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: J = None
        self.z: I = None
        self.o: J = None
        self.y: I = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.p: I = None
        self.v: H = None
        self.u: H = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: I = None
        self.t: H = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.r: B = None
        self.w: I = None
        self.z: D = None
        self.q: I = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.o: C = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

d = A("d")
g = B("g")
i = C("i")
a = D("a")
j = E("j")
n = F("n")
l = G("l")
h = H("h")
b = I("b")
f = J("f")

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: J = None
        self.z: I = None
        self.o: J = None
        self.y: I = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.p: I = None
        self.v: H = None
        self.u: H = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: I = None
        self.t: H = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.r: B = None
        self.w: I = None
        self.z: D = None
        self.q: I = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.o: C = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

d = A("d")
g = B("g")
i = C("i")
a = D("a")
j = E("j")
n = F("n")
l = G("l")
h = H("h")
b = I("b")
f = J("f")

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