class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.z: G = None
        self.s: H = None
        self.u: H = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: B = None
        self.y: H = None
        self.x: A = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: A = None
        self.x: C = None
        self.q: C = None
        self.p: H = None
        self.u: I = None
        self.o: A = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.t: B = None
        self.p: A = None
        self.o: D = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: A = None
        self.r: B = None
        self.z: H = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: G = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.z: G = None
        self.s: H = None
        self.u: H = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: B = None
        self.y: H = None
        self.x: A = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: A = None
        self.x: C = None
        self.q: C = None
        self.p: H = None
        self.u: I = None
        self.o: A = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.t: B = None
        self.p: A = None
        self.o: D = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: A = None
        self.r: B = None
        self.z: H = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: G = None
        self.u: A = None
        self.txt = txt

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

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