class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.q: D = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: D = None
        self.y: B = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.r: E = None
        self.v: A = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

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

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

m.z = f
m.s = j
m.q = n
m.x = n
m.p = h
j.y = l
j.s = m
j.v = m
l.u = h
l.x = a
l.y = j
l.p = e
a.x = k
a.q = k
a.r = k
a.v = m
a.u = c
a.y = c
e.s = a
e.u = a
e.q = m
e.v = j
c.r = f
c.q = l
c.p = j
f.y = l
f.s = m
f.v = m
n.x = e
n.q = k
n.r = k
n.v = h
n.u = c
n.y = c
k.s = a
k.u = n
k.q = m
k.v = f
h.z = j
h.s = f
h.q = a
h.x = a
h.p = m
assert j.v.s.y.x.v.p.x.v.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.q: D = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: D = None
        self.y: B = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.r: E = None
        self.v: A = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

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

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

m.z = f
m.s = j
m.q = n
m.x = n
m.p = h
j.y = l
j.s = m
j.v = m
l.u = h
l.x = a
l.y = j
l.p = e
a.x = k
a.q = k
a.r = k
a.v = m
a.u = c
a.y = c
e.s = a
e.u = a
e.q = m
e.v = j
c.r = f
c.q = l
c.p = j
f.y = l
f.s = m
f.v = m
n.x = e
n.q = k
n.r = k
n.v = h
n.u = c
n.y = c
k.s = a
k.u = n
k.q = m
k.v = f
h.z = j
h.s = f
h.q = a
h.x = a
h.p = m
assert j.v.s.y.x.v.p.x.v.p.z.txt == "j"