class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: F = None
        self.p: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: F = None
        self.p: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

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

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

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