class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: G = None
        self.r: I = None
        self.w: J = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.s: F = None
        self.z: A = None
        self.u: I = None
        self.o: I = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.s: A = None
        self.x: H = None
        self.u: D = None
        self.w: J = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: A = None
        self.w: C = None
        self.p: H = None
        self.o: B = None
        self.u: A = None
        self.x: H = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: G = None
        self.r: I = None
        self.w: J = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.s: F = None
        self.z: A = None
        self.u: I = None
        self.o: I = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.s: A = None
        self.x: H = None
        self.u: D = None
        self.w: J = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: A = None
        self.w: C = None
        self.p: H = None
        self.o: B = None
        self.u: A = None
        self.x: H = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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