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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: J = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: J = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

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

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