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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.p: C = None
        self.z: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: I = None
        self.w: J = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.s: H = None
        self.y: F = None
        self.w: H = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.p: C = None
        self.z: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: I = None
        self.w: J = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.s: H = None
        self.y: F = None
        self.w: H = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: C = None
        self.txt = txt

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

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