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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: D = None
        self.z: B = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: H = None
        self.u: B = None
        self.s: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.x: E = None
        self.s: E = None
        self.p: E = None
        self.v: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: J = None
        self.r: G = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.q: G = None
        self.y: E = None
        self.v: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: D = None
        self.z: B = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: H = None
        self.u: B = None
        self.s: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.x: E = None
        self.s: E = None
        self.p: E = None
        self.v: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: J = None
        self.r: G = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.q: G = None
        self.y: E = None
        self.v: I = None
        self.t: I = None
        self.txt = txt

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

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