class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.t: D = None
        self.z: C = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.x: D = None
        self.t: J = None
        self.w: G = None
        self.v: H = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: F = None
        self.u: J = None
        self.t: H = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.x: D = None
        self.t: J = None
        self.w: G = None
        self.v: H = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: F = None
        self.u: J = None
        self.t: H = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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