class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: B = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: H = None
        self.t: B = None
        self.s: J = None
        self.o: B = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.w: C = None
        self.z: D = None
        self.o: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: H = None
        self.t: B = None
        self.s: J = None
        self.o: B = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.w: C = None
        self.z: D = None
        self.o: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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