class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.s: J = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.x: I = None
        self.t: A = None
        self.q: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.q: E = None
        self.p: F = None
        self.z: I = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.x: I = None
        self.t: A = None
        self.q: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.q: E = None
        self.p: F = None
        self.z: I = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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