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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.v: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.o: B = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

a = A("a")
h = B("h")
n = C("n")
i = D("i")
k = E("k")
f = F("f")
m = C("m")
l = A("l")
g = E("g")
j = F("j")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.v: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.o: B = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

a = A("a")
h = B("h")
n = C("n")
i = D("i")
k = E("k")
f = F("f")
m = C("m")
l = A("l")
g = E("g")
j = F("j")

a.v = i
a.t = m
a.u = h
a.s = h
a.z = k
h.p = j
h.t = n
n.s = g
n.u = a
n.v = i
n.z = i
i.x = a
k.q = n
k.x = i
k.s = f
k.t = a
f.s = l
f.y = a
f.o = h
f.v = h
f.p = j
m.s = k
m.u = a
m.v = i
m.z = i
l.v = i
l.t = n
l.u = h
l.s = h
l.z = k
g.q = n
g.x = i
g.s = f
g.t = l
j.s = a
j.y = a
j.o = h
j.v = h
j.p = f
assert m.s.q.u.v.x.z.x.txt == "i"