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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.p: E = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.q: E = None
        self.w: C = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.x: H = None
        self.v: D = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: I = None
        self.s: B = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.p: E = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.q: E = None
        self.w: C = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.x: H = None
        self.v: D = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: I = None
        self.s: B = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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