class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: J = None
        self.r: H = None
        self.x: F = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.q: A = None
        self.s: B = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.q: A = None
        self.s: B = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

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

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

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