class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: E = None
        self.x: D = None
        self.v: H = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.q: E = None
        self.t: H = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: J = None
        self.q: F = None
        self.s: C = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.y: G = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.q: E = None
        self.t: H = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: J = None
        self.q: F = None
        self.s: C = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.y: G = None
        self.s: E = None
        self.txt = txt

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

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

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