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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.p: C = None
        self.r: F = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.u: F = None
        self.r: B = None
        self.o: H = None
        self.q: F = None
        self.y: A = None
        self.t: G = None
        self.s: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: B = None
        self.p: D = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.x: E = None
        self.v: F = None
        self.q: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.p: C = None
        self.r: F = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.u: F = None
        self.r: B = None
        self.o: H = None
        self.q: F = None
        self.y: A = None
        self.t: G = None
        self.s: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: B = None
        self.p: D = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.x: E = None
        self.v: F = None
        self.q: G = None
        self.txt = txt

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

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

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