class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.p: J = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.t: C = None
        self.s: E = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.o: H = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: F = None
        self.r: I = None
        self.q: D = None
        self.p: B = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.z: H = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.t: C = None
        self.s: E = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: D = None
        self.o: H = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: F = None
        self.r: I = None
        self.q: D = None
        self.p: B = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.z: H = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

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