class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: F = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: I = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: E = None
        self.q: F = None
        self.w: A = None
        self.s: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: G = None
        self.y: D = None
        self.u: H = None
        self.r: B = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: B = None
        self.z: J = None
        self.y: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.q: A = None
        self.y: F = None
        self.w: G = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: I = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: E = None
        self.q: F = None
        self.w: A = None
        self.s: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: G = None
        self.y: D = None
        self.u: H = None
        self.r: B = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: B = None
        self.z: J = None
        self.y: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.q: A = None
        self.y: F = None
        self.w: G = None
        self.o: I = None
        self.z: H = None
        self.txt = txt

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

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