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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: J = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.w: G = None
        self.y: A = None
        self.v: G = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.p: G = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: J = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.w: G = None
        self.y: A = None
        self.v: G = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.p: G = None
        self.r: B = None
        self.txt = txt

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

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