class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.t: H = None
        self.w: I = None
        self.v: G = None
        self.p: C = None
        self.s: E = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.v: A = None
        self.p: E = None
        self.o: J = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: H = None
        self.q: B = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.v: A = None
        self.p: E = None
        self.o: J = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: H = None
        self.q: B = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

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