class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: J = None
        self.o: D = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: F = None
        self.v: H = None
        self.y: G = None
        self.w: E = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: G = None
        self.q: F = None
        self.s: B = None
        self.u: J = None
        self.y: G = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.p: C = None
        self.u: F = None
        self.y: H = None
        self.t: C = None
        self.v: F = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: F = None
        self.v: H = None
        self.y: G = None
        self.w: E = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: G = None
        self.q: F = None
        self.s: B = None
        self.u: J = None
        self.y: G = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.p: C = None
        self.u: F = None
        self.y: H = None
        self.t: C = None
        self.v: F = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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