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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: H = None
        self.y: J = None
        self.o: J = None
        self.z: I = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: J = None
        self.s: B = None
        self.o: F = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.u: J = None
        self.t: B = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.w: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.x: A = None
        self.t: E = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: H = None
        self.y: J = None
        self.o: J = None
        self.z: I = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: J = None
        self.s: B = None
        self.o: F = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.u: J = None
        self.t: B = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.w: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.x: A = None
        self.t: E = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.txt = txt

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

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

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