class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.t: E = None
        self.y: C = None
        self.o: F = None
        self.s: A = None
        self.q: B = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.p: I = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: E = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.v: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.z: E = None
        self.q: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.p: I = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: E = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.v: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.z: E = None
        self.q: G = None
        self.txt = txt

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

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