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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: E = None
        self.v: J = None
        self.w: F = None
        self.s: J = None
        self.q: J = None
        self.t: J = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: C = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: I = None
        self.s: C = None
        self.x: D = None
        self.q: B = None
        self.o: B = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: E = None
        self.u: I = None
        self.p: G = None
        self.r: I = None
        self.o: B = None
        self.y: F = None
        self.v: C = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.u: G = None
        self.p: H = None
        self.q: H = None
        self.x: B = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.s: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: E = None
        self.v: J = None
        self.w: F = None
        self.s: J = None
        self.q: J = None
        self.t: J = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: C = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: I = None
        self.s: C = None
        self.x: D = None
        self.q: B = None
        self.o: B = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: E = None
        self.u: I = None
        self.p: G = None
        self.r: I = None
        self.o: B = None
        self.y: F = None
        self.v: C = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.u: G = None
        self.p: H = None
        self.q: H = None
        self.x: B = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.s: G = None
        self.w: A = None
        self.txt = txt

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

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