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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.u: A = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.s: B = None
        self.z: F = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.r: A = None
        self.s: A = None
        self.q: C = None
        self.w: E = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: I = None
        self.r: F = None
        self.z: F = None
        self.v: E = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: E = None
        self.q: J = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.u: A = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.s: B = None
        self.z: F = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.r: A = None
        self.s: A = None
        self.q: C = None
        self.w: E = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: I = None
        self.r: F = None
        self.z: F = None
        self.v: E = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: E = None
        self.q: J = None
        self.x: A = None
        self.txt = txt

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

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

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