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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.t: I = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: A = None
        self.o: H = None
        self.r: D = None
        self.p: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: B = None
        self.t: I = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: A = None
        self.o: H = None
        self.r: D = None
        self.p: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

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

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