class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.z: H = None
        self.o: C = None
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.z: J = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.q: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.p: F = None
        self.w: A = None
        self.y: E = None
        self.r: A = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.z: J = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.q: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.p: F = None
        self.w: A = None
        self.y: E = None
        self.r: A = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

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

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