class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: D = None
        self.y: H = None
        self.q: C = None
        self.o: B = None
        self.r: D = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: D = None
        self.s: C = None
        self.u: E = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: I = None
        self.t: A = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.w: E = None
        self.t: E = None
        self.q: D = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: E = None
        self.y: G = None
        self.x: E = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
j = B("j")
m = C("m")
g = D("g")
i = E("i")
d = F("d")
k = G("k")
n = H("n")
f = I("f")
l = J("l")

b.v = l
b.s = g
b.r = g
b.y = n
b.p = n
b.q = m
b.o = j
j.t = i
j.u = i
j.q = g
j.s = m
j.w = k
j.o = k
m.s = k
g.y = j
g.x = j
g.u = n
g.q = b
i.p = d
i.v = d
i.z = f
i.t = b
d.v = n
d.p = i
d.w = i
d.t = i
d.q = g
d.o = j
d.r = j
k.v = n
k.q = b
k.x = b
n.t = m
n.v = m
n.x = m
n.s = i
n.r = i
n.w = k
n.y = k
n.u = d
n.p = d
n.o = j
f.w = l
f.z = i
f.x = i
f.y = k
f.q = k
f.r = m
l.q = b
l.t = b
l.z = b
l.r = n
l.o = m
l.s = m
l.w = g
l.u = f
assert f.r.s.q.p.w.x.o.q.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: D = None
        self.y: H = None
        self.q: C = None
        self.o: B = None
        self.r: D = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: D = None
        self.s: C = None
        self.u: E = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: I = None
        self.t: A = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.w: E = None
        self.t: E = None
        self.q: D = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: E = None
        self.y: G = None
        self.x: E = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
j = B("j")
m = C("m")
g = D("g")
i = E("i")
d = F("d")
k = G("k")
n = H("n")
f = I("f")
l = J("l")

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