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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: A = None
        self.y: H = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: A = None
        self.y: H = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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