class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: H = None
        self.t: G = None
        self.r: G = None
        self.q: G = None
        self.y: I = None
        self.u: D = None
        self.p: D = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: B = None
        self.y: I = None
        self.s: G = None
        self.u: H = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: E = None
        self.v: D = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: B = None
        self.y: I = None
        self.s: G = None
        self.u: H = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: E = None
        self.v: D = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

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