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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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