class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: E = None
        self.w: B = None
        self.t: G = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: E = None
        self.v: G = None
        self.s: J = None
        self.x: E = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: F = None
        self.o: J = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: J = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.o: D = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.r: C = None
        self.s: E = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: I = None
        self.t: G = None
        self.y: E = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: E = None
        self.v: G = None
        self.s: J = None
        self.x: E = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: F = None
        self.o: J = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: J = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.o: D = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.r: C = None
        self.s: E = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: I = None
        self.t: G = None
        self.y: E = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

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