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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: A = None
        self.r: J = None
        self.x: G = None
        self.s: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.t: G = None
        self.o: I = None
        self.w: C = None
        self.z: C = None
        self.r: G = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: A = None
        self.r: J = None
        self.x: G = None
        self.s: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.t: G = None
        self.o: I = None
        self.w: C = None
        self.z: C = None
        self.r: G = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: I = None
        self.txt = txt

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

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

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

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