class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: F = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: D = None
        self.o: H = None
        self.q: B = None
        self.v: F = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: E = None
        self.y: A = None
        self.z: D = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: F = None
        self.z: A = None
        self.x: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.u: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.x: D = None
        self.y: D = None
        self.s: C = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.q: B = None
        self.u: C = None
        self.x: E = None
        self.t: C = None
        self.z: C = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: D = None
        self.o: H = None
        self.q: B = None
        self.v: F = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: E = None
        self.y: A = None
        self.z: D = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: F = None
        self.z: A = None
        self.x: I = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.u: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.x: D = None
        self.y: D = None
        self.s: C = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.q: B = None
        self.u: C = None
        self.x: E = None
        self.t: C = None
        self.z: C = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

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

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