class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: D = None
        self.p: C = None
        self.z: C = None
        self.w: I = None
        self.s: C = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.s: H = None
        self.r: A = None
        self.v: I = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: H = None
        self.z: F = None
        self.t: C = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.x: E = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: C = None
        self.u: B = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.s: H = None
        self.r: A = None
        self.v: I = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: H = None
        self.z: F = None
        self.t: C = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.x: E = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: C = None
        self.u: B = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

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

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

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

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