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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: I = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: J = None
        self.z: D = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: I = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: J = None
        self.z: D = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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