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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.r: G = None
        self.q: A = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: D = None
        self.p: H = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: H = None
        self.r: G = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.y: H = None
        self.o: H = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: B = None
        self.y: B = None
        self.x: H = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.r: G = None
        self.q: A = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: D = None
        self.p: H = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: H = None
        self.r: G = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.y: H = None
        self.o: H = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: B = None
        self.y: B = None
        self.x: H = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

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

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

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