class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.v: C = None
        self.s: I = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.t: J = None
        self.q: C = None
        self.w: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.z: D = None
        self.p: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: I = None
        self.v: E = None
        self.x: D = None
        self.s: B = None
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.t: J = None
        self.z: B = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
c = C("c")
k = D("k")
h = E("h")
m = F("m")
f = G("f")
n = H("n")
i = I("i")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.t: J = None
        self.q: C = None
        self.w: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: F = None
        self.z: D = None
        self.p: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: I = None
        self.v: E = None
        self.x: D = None
        self.s: B = None
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.t: J = None
        self.z: B = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
c = C("c")
k = D("k")
h = E("h")
m = F("m")
f = G("f")
n = H("n")
i = I("i")
j = J("j")

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