class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: D = None
        self.z: G = None
        self.s: C = None
        self.o: D = None
        self.w: I = None
        self.v: E = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: I = None
        self.t: E = None
        self.s: F = None
        self.w: C = None
        self.r: I = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: E = None
        self.x: H = None
        self.t: D = None
        self.w: J = None
        self.o: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.q: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: I = None
        self.t: E = None
        self.s: F = None
        self.w: C = None
        self.r: I = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: E = None
        self.x: H = None
        self.t: D = None
        self.w: J = None
        self.o: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.q: H = None
        self.p: A = None
        self.txt = txt

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

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