class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: B = None
        self.u: C = None
        self.x: F = None
        self.v: B = None
        self.o: B = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.v: B = None
        self.s: G = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.s: B = None
        self.z: B = None
        self.v: D = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

l = A("l")
b = B("b")
f = C("f")
k = D("k")
i = E("i")
m = F("m")
d = G("d")
h = B("h")
c = A("c")
j = B("j")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: B = None
        self.u: C = None
        self.x: F = None
        self.v: B = None
        self.o: B = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.v: B = None
        self.s: G = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.s: B = None
        self.z: B = None
        self.v: D = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

l = A("l")
b = B("b")
f = C("f")
k = D("k")
i = E("i")
m = F("m")
d = G("d")
h = B("h")
c = A("c")
j = B("j")

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