class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.v: C = None
        self.w: I = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: J = None
        self.t: D = None
        self.x: A = None
        self.s: G = None
        self.q: D = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.s: G = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: I = None
        self.t: G = None
        self.v: I = None
        self.o: J = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: D = None
        self.t: J = None
        self.y: E = None
        self.r: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: J = None
        self.t: D = None
        self.x: A = None
        self.s: G = None
        self.q: D = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.s: G = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: I = None
        self.t: G = None
        self.v: I = None
        self.o: J = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: D = None
        self.t: J = None
        self.y: E = None
        self.r: G = None
        self.txt = txt

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

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

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