class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.z: B = None
        self.p: E = None
        self.v: D = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: G = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: G = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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