class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: F = None
        self.o: E = None
        self.q: E = None
        self.r: F = None
        self.v: G = None
        self.u: G = None
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: F = None
        self.o: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.y: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: F = None
        self.o: E = None
        self.q: E = None
        self.r: F = None
        self.v: G = None
        self.u: G = None
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: F = None
        self.o: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.y: C = None
        self.t: C = None
        self.txt = txt

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

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