class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.x: E = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.z: I = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.z: I = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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