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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: F = None
        self.s: D = None
        self.x: G = None
        self.o: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.v: D = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: F = None
        self.s: D = None
        self.x: G = None
        self.o: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.v: D = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.r: G = None
        self.txt = txt

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

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