class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.r: H = None
        self.o: G = None
        self.x: C = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.v: G = None
        self.r: I = None
        self.p: A = None
        self.s: G = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: J = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.v: G = None
        self.r: I = None
        self.p: A = None
        self.s: G = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: J = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: H = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

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