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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.z: F = None
        self.p: E = None
        self.v: G = None
        self.r: B = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: I = None
        self.q: B = None
        self.v: H = None
        self.y: B = None
        self.w: B = None
        self.z: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.z: F = None
        self.p: E = None
        self.v: G = None
        self.r: B = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: I = None
        self.q: B = None
        self.v: H = None
        self.y: B = None
        self.w: B = None
        self.z: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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