class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: B = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: I = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: D = None
        self.y: B = None
        self.q: B = None
        self.x: D = None
        self.s: B = None
        self.v: B = None
        self.o: B = None
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: J = None
        self.x: C = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: I = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: D = None
        self.y: B = None
        self.q: B = None
        self.x: D = None
        self.s: B = None
        self.v: B = None
        self.o: B = None
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: J = None
        self.x: C = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

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

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

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