class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.v: E = None
        self.y: C = None
        self.o: I = None
        self.u: J = None
        self.t: B = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.p: F = None
        self.v: E = None
        self.u: G = None
        self.y: H = None
        self.s: C = None
        self.z: J = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.z: E = None
        self.v: J = None
        self.y: J = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.p: F = None
        self.v: E = None
        self.u: G = None
        self.y: H = None
        self.s: C = None
        self.z: J = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.z: E = None
        self.v: J = None
        self.y: J = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

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