class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.p: I = None
        self.y: J = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: A = None
        self.p: H = None
        self.r: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: J = None
        self.q: E = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: A = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: A = None
        self.p: H = None
        self.r: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: J = None
        self.q: E = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: A = None
        self.u: B = None
        self.txt = txt

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

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