class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: D = None
        self.s: A = None
        self.x: C = None
        self.u: G = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: I = None
        self.x: J = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: D = None
        self.s: A = None
        self.x: C = None
        self.u: G = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: I = None
        self.x: J = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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